Faced with growing competition from Chinese-based electric vehicle manufacturers, Tesla says it is shelving plans to build a second assembly line at its Shanghai factory.