NEW YORK/SHANGHAI (Reuters) - Wal-Mart Stores Inc has sold its Chinese online grocery store in return for a stake in the country's no. 2 e-commerce firm, ripping up its previous strategy in efforts to cure ailing sales in one of the world's toughest retail markets.