Walmart’s e-commerce investments are helping the retail giant catch up with Amazon