Support of MessageCodec for event bus serialization

2nd pass at message codec. I still don't like how we are mapping type to codec. We could map which codec was used, and ask each codec if it should encode, but I think this is better with a proper interceptor approach.