Expose StateMap to users of the binding

In lxd, we're serializing states to json (and unserializing it), so it would be handy to not have to
re-define this in that code too.