Prepare for new connection handling
Summary: This differential implements methods to create and close connection to SQLite database. It also disables WAL mode on web to prevent issues described here: https://linear.app/comm/issue/ENG-6413/error-while-processing-replace-thread-operation-disk-io-error#comment-b6ef8d83
Test Plan:
Future differentials will heavily use connection handling so testing it directly is redundant. To test WAL disabling we must actually use the whole stack:
- Build WASM and run web app without this stack.
- Apply this stack, re-build WASM and run web app again. Ensure not to clear site data or not to run tests in incognito mode! Otherwise you will only test WAL disabling upon fresh db creation but not the migration.
- Ensure refreshing doesn't cause log-out/loss of data.
Execute test plan for native app as well since WAL is also disabled there.
Reviewers: kamil, michal
Reviewed By: kamil
Subscribers: atul, ashoat, tomek
Differential Revision: https://phab.comm.dev/D10703