Updated protocol-facing code for new binary protocol

Notes:
This reflects the latest class-based socket.io-protocol. 

Older commit messages:
This is a squash of four boring commits. The gist is that client.js
encoding and decoding stuff was updated to take an array of encoded packets
to write, and to handle sequences of binary packets to decode. There was
also merging done with upstream. All tests are passing.