Fix MacOS app loosing device token in undeterministic manner
Summary:
This differential solves bug that is well described in relevant Linear task:
https://linear.app/comm/issue/ENG-5890/macos-app-looses-devicetoken-in-undeterministic-manner
Test Plan: Build desktop app. Log in and log out multiple time. Ensure that notifications are always working. Additionally close and re-open the window (without closing app!). Ensure that no error appears in console and notifications work correctly.
Reviewers: michal
Reviewed By: michal
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D9970