The Spanish lender took a series of one-time charges to compensate consumers in Britain for the improper selling of payment-protection insurance and for the decline in the value of software.