Test case bought on behalf of 46mn credit and debit card customers ends in deal for compensation of about £200mn