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.
Alex's changes
Fixed bug
Merge pull request #46 from dannybutler/master

Adding SQL parsing and multithreading