Remove unused constant READ_INTERVAL -- we use EventMachine to stream input now.
Remove unused constant MAX_READ_SIZE.
Make sure all event registration and input processing happens on the EventMachine thread, so that we don't get race conditions where incoming messages are processed before the socket's onmessage event handler has been registered.