The Nasdaq on Friday closes at an all-time high and the S&P 500 narrowly misses its own, as investors buy stocks following an April employment report that came in hotter than expected, underscoring consistent labor-market strength.