Added support for a metrics collections

Added a metric collection for storing unit metric in the state server

Only support for:

* adding new metrics
* getting lists of unsent metrics
* setting the sent flag
(and we'll validate it anyway, so we can at least be certain that the metrics match up with the data)