Message decoder based on netty's
LengthFieldBasedFrameDecoder but avoiding the
additional memory copy inside
#extractFrame(ChannelHandlerContext,ByteBuf,int,int)since we completely decode the
ByteBuf inside
#decode(ChannelHandlerContext,ByteBuf) and will not re-use it afterwards.
The frame-length encoder will be based on this transmission scheme created by
NettyMessage#allocateBuffer(ByteBufAllocator,byte,int):
+------------------+------------------+--------++----------------+
| FRAME LENGTH (4) | MAGIC NUMBER (4) | ID (1) || CUSTOM MESSAGE |
+------------------+------------------+--------++----------------+