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
It's standard to call {entity}.st.runTransaction in unit and machine as well. I think this is fine for now.