Adding the when promises lib to slaves.

when requires an amd loader, so we're adding a small shim for that.
Can now publish events both ways.

Extracting reusable faye functions into separate file, so we can reuse
that code in both node and browsers.