Electric carmaker Tesla Inc has seen a flurry of senior executives leave the company in recent months.