[ENG-10786](https://linear.app/comm/issue/ENG-10786/database-downloaded-from-the-backup-is-not-encrypted).
Extracting code, in the next diff, this is used elsewhere.
I also removed `sqlite3 *db` param from `isDatabaseQueryable` - I have no clue why it was needed, but after refactoring, there is no point to keep it.
Depends on D14793