feature(crypto): Add support for master key local pinning
part of invisible crypto, follow up of https://github.com/matrix-org/matrix-rust-sdk/pull/3607 Alternative fix for https://github.com/matrix-org/matrix-rust-sdk/issues/3564 Alternative PR https://github.com/matrix-org/matrix-rust-sdk/pull/3610
Add the capability to locally pin a public MSK for a ReadOnlyUserIdentity.
The first time an identity is seen for a user, the msk is pinned. Pin violation will be reported when an identity is rotated.
This PR only adds support for pinning, support for serialization/migration, persistance. This could be used later by other PRs to report specific errors or show pinning violation to users.
Note about verification and pinning.
As part of this PR, if a new identity is detected it will still be seen as a pinning violation even if the new identity is signed by our usk. But the UserIdentity::has_identity_mismatch() will be ok. There is a pinning violation, but the new identity is verified and verification has priority.
That is to say that there is no auto-pinning if verified so far. To be discussed if we want it later
- [ ] Public API changes documented in changelogs (optional)
Signed-off-by: