Walmart beats on profit, posts record online sales on pandemic boost