Sam Altman has been reinstated as the boss of OpenAI after the company's employees threaten to resign.