Microsoft is giving about 60,000 employees a chance to leave the company voluntarily, a major workforce move that comes as the technology giant pours billions of dollars into artificial intelligence.