Tesla earned $477 million in the first quarter as a widening gap between production and deliveries pushed inventory to 27 days of supply