Use finish event listening instead of overriding res.end()

@twolfson @Raynos