Issue:
refactor(api_keys): remove key ID prefix from plaintext API keys

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates

## Description
<!-- Describe your changes in detail -->
This PR removes the key ID prefix included in the plaintext API keys returned on creating a new API key. The key ID no longer needs to be sent by the user now that #639 makes it easier to identify the API key record in the database table.

## 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).
-->
This change would also simplify our merchant authentication flow and migration of API keys from the merchant account table to the API keys table.

## 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)?
-->

1. Both the `key_id` and the plaintext `api_key` fields now contain the environment prefix for easier identification of the environment with which the keys can be used:

   ```shell
   $ curl --location 'http://localhost:8080/api_keys/merchant_123' \
   --header 'Content-Type: application/json' \
   --header 'Accept: application/json' \
   --header 'api-key: MyVerySecretAdminApiKey' \
   --data '{
     "name": "API Key 1",
     "description": null,
     "expiration": "2023-09-23T01:02:03.000Z"
   }'
   {
     "key_id": "dev_9leW4wj63JYqZ6KFWVT6",
     "merchant_id": "merchant_123",
     "name": "API Key 1",
     "description": null,
     "api_key": "dev_My64CharLongApiKey",
     "created": "2023-03-02T10:16:41.606Z",
     "expiration": "2023-09-23T01:02:03.000Z"
   }
   ```

2. The key prefix returned in the retrieve API key response now returns 12 characters instead of the 8 characters being returned earlier.

   ```shell
   $ curl --location 'http://localhost:8080/api_keys/merchant_123/dev_9leW4wj63JYqZ6KFWVT6' \
   --header 'Content-Type: application/json' \
   --header 'Accept: application/json' \
   --header 'api-key: MyVerySecretAdminApiKey'
   {
     "key_id": "dev_9leW4wj63JYqZ6KFWVT6",
     "merchant_id": "merchant_123",
     "name": "API Key 1",
     "description": null,
     "prefix": "dev_9leW4wj6",
     "created": "2023-03-02T10:16:41.606Z",
     "expiration": "2023-09-23T01:02:03.000Z"
   }
   ```

## 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

---

~Marking as this as draft as this is blocked by #639.~


Resolution:
<think>
PR Context:
- Title: refactor(authentication): authenticate merchant by API keys from API keys table
- Merged: 2023-03-08T09:20:00Z
- Files changed: 8 files
- Commits: 5 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates

## Description
<!-- Describe your changes in detail -->
This PR updates the API key authentication code to use the API keys from the API keys table instead of the merchant account table. I'll be taking up the deprecation of the `api_key` field from the merchant account table in a separate PR.

## Motivation and Context
<!--
Why
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** refactor(authentication): authenticate merchant by API keys from API keys table (#712)
Files to modify:


**crates/router/src/core/api_keys.rs**
  Remove:
    - function: pub::verify_hash
    - struct: pub::PlaintextApiKey
  Add:
    - function: private::from
    - function: private::from
    - function: private::from
    - struct: private::PlaintextApiKey
    - impl: impl From<&str> for PlaintextApiKey
    - impl: impl From<String> for PlaintextApiKey
    - impl: impl From<storage::HashedApiKey> for HashedApiKey

**crates/router/src/core/errors.rs**
  Remove:
    - enum: pub::ApiKeyError

**crates/router/src/db/api_keys.rs**
  Add:
    - function: private::find_api_key_by_key_id_optional
    - function: private::find_api_key_by_key_id_optional

**crates/router/src/routes/metrics.rs**
  Modify existing code

**crates/router/src/scheduler/metrics.rs**
  Modify existing code

**crates/router/src/services/authentication.rs**
  Modify existing code

**crates/storage_models/src/api_keys.rs**
  Add:
    - function: pub::into_inner
    - impl: impl HashedApiKey

**crates/storage_models/src/query/api_keys.rs**
  Add:
    - function: pub::find_optional_by_hashed_api_key