Microsoft Corp.’s earnings easily surpassed estimates on Tuesday, but shares still fell in after-hours trading following a string of record closing prices.