Implement inbound notif session creation from the NSE with race condition handling
Summary: This differential implements inbound notification session creation with race condition handling. The NSE code is modified to use this mechanism when receiving E2EE notification from peer. Android part in CommNotificationsHandler.java will be added shortly after Tunnelbroker <-> FCM diff is out.
Test Plan:
- Apply this patch: https://gist.github.com/marcinwasowicz/8bdc755abad8ecf81f3bd01c6ca34376
- Send notification from web to iOS device.
- Ensure that each notification results in two identical notification being displayed. One is from the keyserver. The other is from tunnelbroker and is E2EE encrypted.
- I also added some logs in NotificationsCryptoModule so that it is logged whether we create new session or use existing one. I only saw the first type of log once.
Reviewers: tomek, kamil, bartek
Reviewed By: kamil
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D12750