Tesla reported its worst-ever quarterly loss and said its Model 3 production target remains on track