router: Send an event when a backend gets drained.

An "all" event gets sent when all backends are drained.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>
pkg: Add SSE writer package.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>
router: Drain hook in the API.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>
router: Use type composition for httpRoute.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>