Keep event history and support Last-Event-ID

Also, makeHandler is now decoupled from makeProxyEmitter, so makeHandler
expects a write() function instead of a full-blown emitter reference.
Apparently fixed jshint invocation