Initial DB implementation for agent stats.

* Initial code for initializing an SQLite database for historic agent
  stats.