The derivative complaint alleged that Elon Musk breached his fiduciary duties and unjustly enriched himself by pursuing the struggling SolarCity, in which he was the largest investor.