Produce fewer exceptions

This fixes two hot exception producers that popped up during performance testing.
This might slightly improve performance, but there's another benefit in that it removes two very noisy spots from the code, so we can get more interesting signal about rarer exceptions.

The CollectUserAgentFilter is only a problem during performance testing, where the load generators don't provide a User-Agent header.
Probably not an issue in production.

The ResultIterator was implemented in a way that required non-local control flow through lambdas.
This is implemented in Scala with trace-less exceptions.
Changing the logic around to no longer do an early return removes the need for this control-flow-by-exception.
This is my understanding: The `hasNext` function is defined by passing a closure through `failIfThrows`. In the old code we had `if (closer.isClosed) return false`, and that `return` is in the context of the `hasNext` function, not the closure. So when `isClosed` is true, the closure has to do a non-local return. Scala implements non-local returns with exceptions, by throwing a `NonLocalReturnControl`.