Hiring across the U.S. was weaker than expected in July, a sign the labor market is shifting into lower gear.