Mastercard settled a collective lawsuit Tuesday on behalf of 45.5 million of the company’s United Kingdom customers over credit card fees.