NEW YORK A murky and long-unresolved dispute over the prices pharmaceutical wholesalers pay for the drugs they distribute has finally been laid to rest, at least as far as the parties involved in the class-action lawsuit and the First Circuit Court of Appeals are concerned. But the settlement has scrambled the carefully calculated sales and profit outlook for thousands of retail pharmacies.