add pragmas for temp_store=mem and synchronous=off

controlled by environmental variables
Merge remote-tracking branch 'refs/remotes/kali/feature/sqlite_optimization_pragmas' into develop