Adding SQL parsing and multithreading

We now parse SQL statements and flush the keywords and identifiers as
metadata.
Also, to avoid future threading issues when receiving flushed data from
multiple clients, we now do all of the database legwork in separate
threads with separate database sessions.