travis: set maximum Java heap size to 2GB.
netty transport: wait for shutdown to complete.