China has rapidly expanded production capacity thanks to a reliance on solar energy, and Tesla is taking a page from its playbook.