Add custom serialization for samoa events when using S4

- pass a custom module defining a custom serializer, that registers samoa event classes and serializers
- could be made configurable by passing a configuration file for events/serializers mapping, and registering using reflection