Elon Musk’s electric car firm has ramped up production as it opens new factories in the US, China and Germany.