The U.S. electric-vehicles maker managed to outperform the broader auto industry in the world's second-biggest economy despite several factors causing a slump for car manufacturers in China.