Microsoft is offering buyouts to around 60,000 employees as it works to contain costs while spending heavily on artificial intelligence.