Competition has been intensifying in the electric vehicle market, and that has resulted in some lackluster results for Tesla in recent quarters.