[native] Avoid copy-constructing CryptoModule
Summary:
See explanation here for why it's unsafe to copy-construct CryptoModule. Basically, the accountBuffer contains memory that represents an olm::Account, which includes members that are olm::Lists. olm::Lists contains a member that is a pointer to another member, which makes it unsafe to copy the accountBuffer wholesale.
This diff changes the code in NotificationsCryptoModule to construct its CryptoModule on the heap as a unique_ptr. We then pass that pointer around, avoiding any need to copy the CryptoModule.
The next diff will remove the copy constructor from CryptoModule to make sure nobody makes this mistake again.
Depends on D9560
Test Plan: I made sure notifs still worked in my local environment (iOS simulator running dev build, along with keyserver connected to APNs in dev mode)
Reviewers: marcin, tomek, bartek, atul
Reviewed By: marcin
Subscribers: wyilio
Differential Revision: https://phab.comm.dev/D9561