spec: define #to_h to marshal the models in a form that can be fed to YAML, JSON and friends