cluster: fix disconnect getting called too early

cluster.disconnect was getting called after just one worker disconnects.
It should be called after all workers disconnect.