Job gains in June were surprisingly strong, defying gloomy forecasts of a looming recession.