The Tesla CEO accused Sam Altman, head of OpenAI, and its partner Microsoft of diverting the non-profit foundation to turn it into a commercial enterprise.