removed binary search, added async dependency
Implemented diconnect from queue logic for both websockets and xhr polling with socket.io

socket.on('disconnect') only fires when using websockets. XHR polling
mode doesn't fire this, so we have to check another way