Fixed implementation of `pass`

The previous version was only applying the passed function to `mempty`, not to
the accumulated log of all events within the proxy.  The fix is to do something
similar to `listen`, storing everything logged up until the end, and then
applying the function to that.