Leaking Netty threads causes file handle exhaustion

As described in Ticket 2862 we buffer overflow in libnss_ldap sometimes during the test. This was due to the fact that we don't properly shut down Netty threads in some places.

There are two commits here, so the second can be cherry picked easily to release-2.1.

Thanks for the new remoting navigation help @drewhk