Rewrite the statistics generation engine to internally use an SQLite database.

Performance testing revealed that generating user-specific statistics by
collecting data during parsing and storing all relevant data in memory would
require entirely too much memory to be feasible for large data sets. By storing
the entire set of data in an SQLite database, we can subsequently retrieve and
calculate the data required for the current task by querying the database.

It is currently unknown if this solution will make all desired statistics
feasible, but initial results are promising.

C++ interface to the SQLite library is provided by the MIT-licensed SQLiteC++
wrapper, currently available at http://srombauts.github.com/SQLiteCpp/.

Signed-off-by: Jason Lynch <jason@calindora.com>