During configuration, a ServerboundCustomClickActionPacket arriving
when connectionInFlight is null falls through to handleGeneric, which
writes it to the connected backend without retaining. The encoder
releases the packet, then MinecraftConnection.channelRead's finally
block releases again - double-free.
Two fixes:
- handle() now uses getConnectionInFlightOrConnectedServer() so the
packet is properly retained before being written
- handleGeneric() retains any ByteBufHolder packet before write, not
just PluginMessagePacket
Closes#1841