Issue:
fix(payment_methods): delete token when a payment reaches terminal state

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
The function call responsible for deleting card details from payments_operations_core() was been removed in this PR #1636. This modification ensured that the redundant deletion of already deleted card details no longer occurs, preventing the unnecessary error from being triggered.

Now as the delete functionality was removed from the payments_operation_core the token created was valid even after the payment reached the terminal states. So, this pr deletes the internal token that is mapped to the locker token in the redis. Hence the token becomes invalid once a payment reaches terminal state.


### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->


## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
<img width="1068" alt="Screen Shot 2023-07-28 at 7 45 39 PM" src="https://github.com/juspay/hyperswitch/assets/83439957/c85c33d9-df2f-4c02-bfe7-4ae47ab8bdc2">
<img width="744" alt="image" src="https://github.com/juspay/hyperswitch/assets/83439957/73571106-b233-45e6-85e2-b567f2174bff">
<img width="966" alt="image" src="https://github.com/juspay/hyperswitch/assets/83439957/219ebb0b-4444-4a98-a59d-8a45c2d3582f">


## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable

Resolution:
<think>
PR Context:
- Title: fix(payment_methods): delete token when a payment reaches terminal state
- Merged: 2023-08-11T11:56:41Z
- Files changed: 4 files
- Commits: 1 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
The function call responsible for deleting card details from payments_operations_core() was been removed in this PR https://github.com/juspay/hyperswitch/pull/1636. This modification ensured that the redundant deletion of already deleted card 
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** fix(payment_methods): delete token when a payment reaches terminal state (#1929)
Files to modify:


**crates/router/src/core/payment_methods/cards.rs**
  Modify existing code

**crates/router/src/core/payments.rs**
  Modify existing code

**crates/router/src/core/payments/helpers.rs**
  Modify existing code

**crates/router/src/routes/payment_methods.rs**
  Add:
    - function: pub::create_key_for_token
    - function: pub::insert
    - function: pub::should_delete_payment_method_token
    - function: pub::delete
    - struct: pub::ParentPaymentMethodToken
    - impl: impl ParentPaymentMethodToken