S&P 500, Nasdaq hit record highs as Apple tops $2 trillion in market value