dbquery: cleanup
dbquery: remove atexit unlock tables

* A function that never worked anyway.
dbquery: profile queries
Merge branch 'db-profiling' into inspirevm20

* db-profiling:
  dbquery: profile queries
  dbquery: remove atexit unlock tables
  dbquery: cleanup