Stocks surged to record highs Wednesday as Republican Donald Trump was projected to win the U.S. presidential election.