Microsoft and OpenAI said they have reached a deal to extend their partnership, an apparent detente that could ease the startup’s path toward changing its structure to include a for-profit corporation.