I considered using composite byte buffers but they would have added GC
overhead and would've been incompatible with any native code we added
unless special care was taken.
This has the potential to cut the time that players spend at the
"logging in..." (or "encrypting..." for 1.13+) screen by a fair
amount (gains of 200+ ms were noted for my own home connection).
While this sounds minor, I really do like to aim for all the details
and this is one of them.
- Potentially fixed a reference count leak with plugin messages.
- Cleaned up plugin message handling.
- Optimized the pipeline for better throughput by eliminating copying
in the varint encoder and reduced object churn elsewhere.