[native] refactor CommCoreModule to allow cancellable tasks
Summary:
context: ENG-2139
refactor CommCoreModule methods that schedule tasks on the database thread to allow them to be canceled - all methods except clearSensitiveData that should not be canceled - is responsible for canceling others.
Test Plan:
- Build app for both iOS and Android
- Check if previous integrations with the database work properly eg. by adding some drafts etc.
- Make sure that there is no operation executed on database thread or added to queue when sensitiveDataCleaner is called
Reviewers: marcin, jon, tomek, atul
Reviewed By: marcin, tomek
Subscribers: ashoat, tomek, atul, abosh
Differential Revision: https://phab.comm.dev/D5579