Wal-Mart has snapped up another online retailer, its third in five months, as it works to close the gap with Amazon.com.