Cancel writes on 5.0

@normanmaurer since I'm currently working with Netty 5.0.0.Alpha2 from the master branch, I've applied  your changes (#2214) to this version. This might save you some time in case you're planning to do the same. What I actually had to do was to rebase `cancel_writes` onto `master` from netty/netty@8e854bbf18a712b35932283a279d3ac99544a265, fix a few conflicts and then migrate the SocketCancelWriteTest.