US stocks close at record highs as oil tumbles, earnings fuel tech rally