+htp #15910 import coding infrastructure from spray

Fixes #15910.

This still needs some tests but the implementation is itself is ready to be reviewed.
In spray we kept a buffer per compressor / decompressor but this would keep lots of memory per connection which we should avoid. Pooling may work but for now I changed the most common case of `compressAndFlush` to use an input dependent-sized buffer which should improve the allocation-rate quite a bit.