United Airlines’ fourth-quarter profit topped Wall Street estimates thanks to strong demand and high fares.