The algorithm could keep Amazon’s in-store shoppers from comparing online prices, a practice which helped the retail giant crush its brick-and-mortar competition.