Visa Inc., MasterCard Inc. and some large banks agreed to pay scores of retailers—from giant Publix Supermarkets Inc. to an interior-design store in Minnesota—more than $6 billion to settle a long-running lawsuit, in a pact that also permits merchants to charge more to customers…