Builders’ confidence in the housing market rose slightly in July, the National Association of Home Builders said.