Quarterly results underscored Microsoft’s good and bad trends as software floundered while the cloud business continued to grow.