U.S. stocks all made historic gains on Wednesday — before erasing much of them on Thursday.