Sammy Altman is preparing to take OpenAI public by 2027, following a tense back-and-forth with California officials that nearly ended in a lawsuit.