The Nasdaq Composite and the S&P 500 hit record highs on Wednesday as upbeat corporate results overs