Tesla's record June quarter deliveries may come at a cost: pressure on its profit margins that could last well into the second half of the year.