Unreverting the revert of statistics with memory leak, fixing the bug

that caused the memory leak, added a few unit tests, version bump
Do you know when this call back will be invoked? Is it when the request is written to some local queue (and before it is goes through the pipeline)? Or is it invoked after the entire request moves through the pipeline and is successfully written to the socket? 

The [netty documentation](https://docs.jboss.org/netty/3.2/api/org/jboss/netty/channel/Channel.html#write%28java.lang.Object,%20java.net.SocketAddress%29) on this matter is inconclusive. You should include detailed logging through the whole process to answer the question.