Before its electric car stunned the world, CEO Lei Jun had to pull off a near-impossible comeback. This is how he did it.