Issue:
[FEATURE] Use newtype pattern for email addresses

### Feature Description

This issue covers one of the problems mentioned in #119, about using [the newtype pattern](https://rust-unofficial.github.io/patterns/patterns/behavioural/newtype.html) for email addresses. The requirement is that email addresses must be validated once during construction/deserialization and should never be validated again. This would also eliminate the validation being performed at the time of masking email addresses (specifically line 97 in the snippet):

https://github.com/juspay/hyperswitch/blob/d107b44fd356f172ef7c9535567d266a6301e43d/crates/common_utils/src/pii.rs#L87-L109

Please also include unit tests in your PR.

_For external contributors, clarify any questions you may have, and let us know that you're interested in picking this up. We'll assign this issue to you to reduce duplication of effort on the same task._

### Possible Implementation

You can use a newtype like so:

```rust
use masking::Secret;

struct Email(Secret<String>);

let email = Email::from_str("..."); // You can use the `FromStr` trait for this purpose
```

For validating emails, the existing regex validation should suffice. Also, implement `Serialize`, `Deserialize` and `masking::Strategy` for `Email`.

### Have you spent some time to check if this feature request has been raised before?

- [X] I checked and didn't find similar issue

### Have you read the Contributing Guidelines?

- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)

### Are you willing to submit a PR?

None

Resolution:
<think>
PR Context:
- Title: refactor: use newtype pattern for email addresses
- Merged: 2023-05-04T14:24:44Z
- Files changed: 30 files
- Commits: 26 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [x] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates

## Description
<!-- Describe your changes in detail -->
- This fixes #608 
- Added testcases

### Additional Changes

- [ ] 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 whe
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** refactor: use newtype pattern for email addresses (#819)
Co-authored-by: Sanchith Hegde <22217505+Sa
Files to modify:


**crates/api_models/src/admin.rs**
  Modify existing code

**crates/api_models/src/customers.rs**
  Modify existing code

**crates/api_models/src/payments.rs**
  Modify existing code

**crates/common_utils/src/pii.rs**
  Remove:
    - struct: pub::Email
    - impl: impl Strategy<T> for validate_email(val_str)
  Add:
    - function: private::from_sql
    - function: private::to_sql
    - function: private::from_str
    - struct: pub::EmailStrategy
    - struct: pub::Email
    - impl: impl FromSql<sql_types::Text, DB> for Email
    - impl: impl ToSql<sql_types::Text, DB> for Email
    - impl: impl FromStr for Email

**crates/router/src/compatibility/stripe/customers/types.rs**
  Modify existing code

**crates/router/src/compatibility/stripe/payment_intents/types.rs**
  Modify existing code

**crates/router/src/compatibility/stripe/setup_intents/types.rs**
  Modify existing code

**crates/router/src/connector/adyen/transformers.rs**
  Modify existing code

**crates/router/src/connector/cybersource/transformers.rs**
  Modify existing code

**crates/router/src/connector/dlocal/transformers.rs**
  Modify existing code

**crates/router/src/connector/multisafepay/transformers.rs**
  Modify existing code

**crates/router/src/connector/nuvei/transformers.rs**
  Modify existing code

**crates/router/src/connector/shift4/transformers.rs**
  Modify existing code

**crates/router/src/connector/stripe/transformers.rs**
  Modify existing code

**crates/router/src/connector/trustpay/transformers.rs**
  Modify existing code

**crates/router/src/connector/utils.rs**
  Modify existing code

**crates/router/src/connector/worldline/transformers.rs**
  Modify existing code

**crates/router/src/connector/zen/transformers.rs**
  Modify existing code

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

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

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

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

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

**crates/router/src/types.rs**
  Modify existing code

**crates/router/src/types/api/customers.rs**
  Remove:
    - function: private::validate
    - trait: pub::CustomerRequestExt
    - impl: impl CustomerRequestExt for CustomerRequest

**crates/router/tests/connectors/cybersource.rs**
  Modify existing code

**crates/router/tests/connectors/zen.rs**
  Modify existing code

**crates/storage_models/src/customers.rs**
  Modify existing code