do not hold the lock while closing, that's impossible
do not hold the lock while closing, that's impossible

only try to realize the truth

there is no lock

Actually, that's not true. We swap out @czk for nil, and spin up the
shutdown thread to close the connection, but without holding onto the mutex.
Since everything is accessing @czk through #czk, they'll get a NotConnected
exception as soon as its nilled out.

This reduces the chances of deadlock during a potentially hangy operation
(shutdown of the underlying connection). Also, insert a hard-coded
30 second tiemout while waiting on the shutdown thread to prevent hanging
forever in the case of unforseen catastrophe

zk-ruby/zookeeper,zk-ruby/zookeeper,rickypai/zookeeper,songling88/zookeeper,songling88/zookeeper,zk-ruby/zookeeper,rickypai/zookeeper,songling88/zookeeper,rickypai/zookeeper,songling88/zookeeper,rickypai/zookeeper