Merge pull request #99 from alexanderson/master

Assorted database structure changes
Moved new thread functionality to incoming packet handler
Added new DB tables for fn names/sql strings + sql stack association
Added extra tables for fn/file names etc. upgraded sql arg and sql stack assoc tables and added index to them, modified stat handlers to put data in these tables
fitted json api to new data structure
Merge fix
Preliminary aggregation update

Fixing json aggregation for new database structure.

Still a couple of kinks to work out.
Small sql flush fix

SQL flushing takes quite a long time, and because before it was not
being committed until every statement was parsed and added, another
flush thread could have already started, leading to duplicate key/values
pairs.

Now fixed by committing after every statement is added.
Merge pull request #100 from dannybutler/master

Preliminary aggregation update
Fixed call stack table search
Merge pull request #101 from dannybutler/master

Fixed call stack table search
Added queue for stat handler

We were getting issues with all of the stat handler threads (handler,
sql, etc) running concurrently (multiple instances of same MetaData
key/value pairs).
So I have now implemented a queue so the main thread doesn't wait, but
only there is only one worker thread, avoiding multithreading problems.
Adding unique constraints

Just making sure of uniqueness of relevant columns.
Merge pull request #102 from dannybutler/master

Added queue for stat handler
Fixed filtering for call stack name

Added a bunch of special case stuff for the call stack
module/class/method filtering.

Also removed unnecessary keys from filtering for certain pages.
Merge pull request #103 from dannybutler/master

Fixed filtering for call stack name
Added filtering to aggregate table links

Bar graphs don't have links yet.
Merge pull request #104 from dannybutler/master

Added filtering to aggregate table links
Persist filtering when navigating pages

When moving from the main aggregation page to a specific aggregation
page, the filters are kept and also now updated in the left hand column.
Unfortunately, these filters are lost when returning to the main page,
or going to an individual item page, but for now this is probably ok.
Bar graph links now also have filter args