The S&P 500 fell slightly on Friday, retreating from record levels, while the strength in major technology names pushed the Nasdaq composite to another all-time high.