Outsource value serialization with automatic support for set serialization
Fixup for serialize_event()
Outsource object-to-id serialization