U.S. employers posted the most job openings in four years in June, a positive sign that hiring may pick up.