Fix some bugs in CardPaymentMethodEditor

Credit Providers tab:
- Do not allow remove the provider, when it have card devices or payments, using this provider.
Card Devices tab:
- Do not allow remove the device, when a provider use it, as default device.
- When remove a device, also remove its references in CreditCardData and CardOperationCost
Add tests

Change-Id: I523d2b3fae8c47d38aead9f9d6c007f619177033