Allow definition of custom message types

There is already a message-ID->class registry that would allow filters to define custom message classes that can be parsed.

To make this usable there needs to be a way to bind possible response messages to event messages (from the class definition), for updating the state machine.