S&P 500 Nears Record High as Oil Prices Ease, Earnings Drive Gains