A 13-year veteran at the electric car giant, Tesla and a potential successor to CEO Elon Musk stepped down from his role.