Tesla was struggling hard as recently as March. But its stock has soared as the company's fortunes have turned around.