Add ISerializable compatible Serialize and Merge methods to TypeModel

There were static methods in Serialize, but couldn't use a custom model with them.