Tesla reports record quarterly deliveries as factories ramps up