types: autobind serialize/deserialize methods

This is convenient and some old code relies on non-prototype semantics