Exclude request from 404 exception env inspection

Yeah, this is ghetto, but it makes github/github#15020 simpler.

Right now, we have to store the `request` object in `Thread.current` for constraints-based routing if we want access to the request when running our constraint match.

See github/github#14468 for additional background, where the `request` was removed from the `env` because it was causing unexpected needles for all 404s.

NOTE: This `env` is not the same as `request.env`, it's a subset produced by [`extract_request_environment`](https://github.com/github/rails/blob/685cb901fcc86491a3424a7f2e27f61ba4e135c7/actionpack/lib/action_controller/routing/route_set.rb#L442).

cc @github/discussions @github/rails