Add msgpack serialization support

This set of patches adds msgpack serialization support if the required library is installed.

Apart from that they also strip out the internal fact _timestamp as that was a time object and couldn't be serialized. This is basically a bugfix but could be considered a backwards incompatible change.

They also move the confine handling out of provider to avoid a require loop as it was also used by formats.