Revenue grows to $48.4 billion, helping fuel the chief executive’s bets on augmented reality and artificial intelligence.