[lib] introduce stateless olm API
Summary:
The point of this code is to introduce stateless olm interface shared across all platforms:
- on native we have CryptoModule which takes care of each action and persists state
- on web there is ongoing @michal's work to achieve the same (project).
This will allow us to:
- use olm API from /lib (we can also expand it to /keyserver)
- move code like peerToPeerMessageHandler to /lib
- completely move taking care of state/transactions/atomicity to a different place and from a business logic perspective only call methods
Right now, on web it will cause some code duplication with OlmSessionCreatorContext, but after ENG-6462 this context won't have any state and we can remove it and just use this API.
This also helps @michal to implement moving responsibility to worker - right now app still works with context and when everything is ready we can just "flip-the-switch" to use this API.
This approach was discussed with @michal, @tomek, and @marcin.
Depends on D11110
Test Plan: Tested encrypt/decrypt methods on web with properly generated accounts/sessions.
Reviewers: marcin, varun, tomek, michal
Reviewed By: tomek, michal
Subscribers: inka, ashoat, tomek, marcin, michal
Differential Revision: https://phab.comm.dev/D11111