Fix race conditions related to ZkCloudnameIntegrationTest

**Reopen socket in PortForwarder when unpausing**
Previously, PortForwarder would close the server socket when pausing the port forwarder without reopening it when unpausing, causing future connections to fail.

**Fix race conditions in ZkCloudnameIntegrationTest**
It's not thread safe to make decisions based on the test `waitForEvent.size() > 0` without wrapping the whole operation in a synchronized block, as the size might change after the test.