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
linebreaks before non-test lines (or at least *some* linebreaks at judiciously chosen intervals) would help my puny early-morning brain