The electric vehicle startup had a string of terrible news, capped by the abrupt departure of its CEO. Its troubles are raising questions about the startups that have entered the auto industry.