added long-polling event server

This is the code we're using internally in production. It has some
additional support for multiple event channels which I won't make use of
in the demo
add reverse proxy support to our demo server

CORS headers don't go well with long-polling and because the things run
on different ports, they are seen as being cross-origin, so let's just
proxy the connection to the long-polling server
add support for the long-polling backend

this is the code we're actually running in production, though the
original version is made in coffee and being automatically compiled as
part of our asset compilation pipeline.

Because I didn't want to set up anything like this, the server included
here is the js-compiled version of the code.

The talk will be showing off the coffe version, but I'm sure you can
adapt accordingly.

This is also why I'm including underscore here and why I'm not using
jquery.Event - it allows me to reuse the existing code. For your
purpose, you might want to clean this up a bit