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
If this happens we generated a duplicate UUID elsewhere. It means we're really lucky, or we have a pathological source of randomness on the system. Retry once, and then return with a conspicuous error.