Segregate database reads/writes

- [ ] Segregate reads/writes when executing database operations.
- [ ] Allow for dirty reads using explicit method call InTransactionRawQuery.
- [ ] Make RunInTransaction execution serialised. 
- [ ] Switch to calling RunInTransaction instead of manually starting transactions to avoid interleaved/nested transactions.