Amazon is closing its Fresh grocery stores and Go convenience stores, the company said Tuesday. It will convert some stores to Whole Foods locations.