Improve decorator serialization

* Only serialize the attributes implemented by the decorator.
* Add `to_xml` and `as_json` methods, because although we have implemented `serializable_hash`, the methods that use it will fall through to the model and so it will never be called.