Tesla reported a hefty drop in second-quarter profits Tuesday due to the effect of price cuts while spending aggressively on autonomous driving and other technology.