Sql refactor

This eliminates the 5-6 lines of duplicate code that is scattered everywhere a sql call is made.

It introduces three new methods in helper_sql:

1. `sqlQuery(sql, *args)` - execute a select statement and return the results.

2. `sqlExecute(sql, *args)` - execute INSERT/UPDATE/DELETE or other action requiring a commit.

3. `sqlStoredProcedure(proc_name)` - execute a stored procedure like the vacuum command.

In addition, the sql queues and lock were moved out of shared, so any merged in code that uses the old code will need to be updated.

Note:  There were a few places in the code where multiple updates were wrapped in a single transaction.  This looked to me like a way to use less code rather than to enforce a large multi-statement transaction that could be rolled back.  My code just issues the statements one-by-one instead of adding transaction logic and overhead into the new sql API.