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.
Add selections to plans from the exhaustive planner
Merge pull request #3675 from chrisvest/2.2-fewer-exceptions

Produce fewer exceptions
Merge pull request #3688 from systay/dp-exhaust

Add selections to plans from the exhaustive planner
Lift decision on which PlanType to use up to ExecutionPlan.run

This ensures that we use the same plan for both the profiled and normal case
Rename PlanType to ExecutionMode
Expose schemaStateClearAll() from kernel
Test interaction of different execution modes with query caching