Corrected "Requests calls reply handlers with reply data" test since the first callback arg is treated as an error.
Corrected UniSocketClient#_cleanup() (and everything that calls it) to pass a code and reason to ws.close().

Prevents "InvalidAccessError: Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 0 is neither." in Chrome when a disconnect happens.
setImmediate() doesn't exist in the browser, and browserify apparently doesn't polyfill it.
Corrected reconnect logic to avoid infinite loops.
Catch promise errors on reconnect, and clean up error listener on timeout.