Speeding up event statistics.
This flips the way the event statistics tables work around a bit to allow
for 'free' filtering and caching of the full table. The only time a new
table is generated is when the selection changes, and only when it's not
a select-all.

With this, filtering on even 9 million entry dbs is instant (so long as
the paint times are low).

Fixes #283.
Merge pull request #294 from google/faststats

Speeding up event statistics.