Stocks closed lower on Thursday, as a market-wide rally sparked by blockbuster Nvidia results and guidance lost steam.