Refactor packet encoder/decoder to use and expose externally ByteBuf instead of String