Goldman Sachs, mocked by prospective client Whole Foods, ended up advising Amazon