add a buffer for emitted events to only send after connection

this addresses https://github.com/Automattic/socket.io/issues/1573

added an "emit buffer" that holds on to packets that were emitted before the `connect` event is thrown. Upon connection this buffer is sent through. Now we have another buffer (I'm almost in favor of forcing listen to the `connect` event before emitting), but it doesn't seem too complex so I'll leave this for discussion.

will submit a relevant test to socket.io