Expose StateMap to users of the binding

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