Skip Rack applications and redirects when generating urls

When generating an unnamed url (i.e. using `url_for` with an options
hash) we should skip anything other than standard Rails routes otherwise
it will match the first mounted application or redirect and generate a
url with query parameters rather than raising an error if the options
hash doesn't match any defined routes.

Fixes #8018
(cherry picked from commit 1555a1800ea550a991eb57ce1ec8236bdba0365a)

Conflicts:
	actionpack/CHANGELOG.md