Tesla Inc. ended last year on a roll, with investors increasingly buying into Elon Musk’s ebullience about autonomous vehicles. Winning over actual car buyers was another story.