Rework netty integration to make it possible to store a reference to the...

... buffer