Define global singleton db C++ API.
Summary: This differential implements simplistic GlobalDBSingleton API for safe access to database from diffferent parts of the code. Its simplicity stems from the fact that Android and iOS will use different synchronization that will be implemented in platform-specific code.
Test Plan: Build the app.
Reviewers: tomek, atul, jon
Reviewed By: tomek
Subscribers: ashoat, abosh
Differential Revision: https://phab.comm.dev/D5231