Treat paths originating as PEP 508 URLs which contain expanded variables as relative (#18680)
## Summary
Fix a regression caused by and reported in #18176.
PEP 508 doesn't actually permit variables to be specified within these
URLs but we support this probably due to needing to handle it for
requirements files.
To avoid a breaking change in a patch release, any `VerbatimUrl` that
was parsed as a PEP 508 URL that contained variables that were expanded
is always treated as relative.
The determination of if a `VerbatimUrl` qualifies has to be done at
creation time because otherwise we would incorrectly treat a non PEP 508
URL which contained something which looks like a variable reference as a
relative path in cases where this wouldn't be correct.
## Test Plan
Existing test coverage covers the non-regressed case, added a test for
the regressed case.