Restructure the output db handling code

The book-keeper and friends have been massaged into a few clear abstraction layers:

* Event manager - (currently a global singleton) that provides easy functionality for creating and recording data via events.

* Events - a collection of field-value pairs that are dispatched to backends.  Events can hold _any_ type of data

* Arbitrary Backends - I have created an sqlite backend to start.  Backends are registered with an event manager to receive notifications of events that have been recorded.  The backend is free to do whatever it wants to with the data.  Backends can choose to support an arbitrary set of event data types.

Recording to the output db for an agent (or in the core) is as easy as:

```c++
EM->newEvent(this, "MyStats")
  ->addVal("capacity", cap)
  ->addVal("time", TI->time())
  ->addVal(...)
  ->record();
```

The event manager checks collected event field-value type schemas for consistency (e.g. putting two different data types in a single table column).

Note that there is a companion pull request in cycamore.