Microsoft had its most profitable quarter. Profits rose 47 percent to $16.5 billion, surpassing expectations.