Linear task: https://linear.app/comm/issue/ENG-1603/track-every-sqlite-query-on-native
We want to keep track of every SQLite query that modifies the database so we can send it as a log to the backup service. That will allow us to recreate the database using backups.
I used sqlite3_trace_v2 for this (ref: https://www.sqlite.org/c3ref/trace_v2.html)
I temporarily added a log so the queries are printed out. I suppose we do not want to do that but I just wanted to add it to the initial state of this diff (also for testing purposes). I will replace it with something like // TODO: send logs to backup here