December with a gain, as investors cheered the long-awaited update to electric-vehicle giant’s Full Self-Driving software.