Amazon plans to close its Fresh supermarkets and Go convenience marts, and convert some locations into Whole Foods stores.