Microsoft beat estimates on both earnings and revenue in the fourth quarter of its 2017 fiscal year, sending the stock up.