U.S. stocks eked out small gains on Wall Street Friday in a wobbly day of trading to kick off the new year.