WIP: upgrade netty to 4.0.17

This PR upgrades the netty version which we use from 3 to 4.0.17. 

__Pending__

The PR is close but still needs a few fixes in tests.