U.S. stocks were little changed Thursday, with major indexes trading near records as investors ring out a tumultuous year that saw equities collapse into a bear market before rebounding to all-time highs.