After months of rancor, the two companies finally worked out a deal that gives OpenAI more independence and Microsoft first shot at the AI firm's newest advances. But one company came out ahead.