gh-158907: Do not send proxy credentials to a direct origin on 407 (#158956)

* gh-158907: Do not send proxy credentials to a direct origin on 407

ProxyBasicAuthHandler and ProxyDigestAuthHandler looked up passwords with the scheme-less origin host, so an HTTP 407 could match credentials stored for HTTPS and retry in cleartext.

---------

Co-authored-by: Senthil Kumaran <senthil@python.org>
3 files changed