Microsoft was once viewed as an early artificial-intelligence leader, thanks in part to its longstanding relationship with OpenAI. Now the company and its shares have fallen out of investors’ good ...