More robust automatic messageType detection for ChannelInboundMessageHandlerAdapter and MessageToMessageDecoder