Fix check for existing crate when using --extern
Fix check for existing crate when using --extern

When checking for an existing crate, compare against the
`crate_metadata::name` field, which is the crate name which
was requested during resolution, rather than the result of the
`crate_metadata::name()` method, which is the crate name within
the crate metadata, as these may not match when using the --extern
option to `rustc`.

This fixes spurious "multiple crate version" warnings under the
following scenario:

- The crate `foo`, is referenced multiple times
- `--extern foo=./path/to/libbar.rlib` is specified to rustc
- The internal crate name of `libbar.rlib` is not `foo`

The behavior surrounding `Context::should_match_name` and the
comments in `loader.rs` both lead me to believe that this scenario
is intended to work.

Fixes #17186

mdinger/rust,omasanori/rust,richo/rust,andars/rust,mahkoh/rust,rprichard/rust,zaeleus/rust,gifnksm/rust,kwantam/rust,mihneadb/rust,gifnksm/rust,mvdnes/rust,richo/rust,ebfull/rust,P1start/rust,zubron/rust,nwin/rust,graydon/rust,krzysz00/rust,ebfull/rust,krzysz00/rust,GBGamer/rust,dwillmer/rust,pelmers/rust,zubron/rust,vhbit/rust,zubron/rust,sae-bom/rust,carols10cents/rust,l0kod/rust,zachwick/rust,vhbit/rust,AerialX/rust-rt-minimal,avdi/rust,nwin/rust,mahkoh/rust,barosl/rust,aneeshusa/rust,XMPPwocky/rust,aepsil0n/rust,ejjeong/rust,quornian/rust,0x73/rust,quornian/rust,dwillmer/rust,miniupnp/rust,emk/rust,AerialX/rust-rt-minimal,0x73/rust,mihneadb/rust,jroesch/rust,philyoon/rust,robertg/rust,kwantam/rust,victorvde/rust,victorvde/rust,ejjeong/rust,hauleth/rust,untitaker/rust,kwantam/rust,0x73/rust,jroesch/rust,cllns/rust,victorvde/rust,seanrivera/rust,rohitjoshi/rust,gifnksm/rust,mihneadb/rust,ktossell/rust,bombless/rust,vhbit/rust,kwantam/rust,zubron/rust,l0kod/rust,mvdnes/rust,l0kod/rust,richo/rust,aepsil0n/rust,carols10cents/rust,KokaKiwi/rust,dinfuehr/rust,P1start/rust,reem/rust,TheNeikos/rust,mdinger/rust,ruud-v-a/rust,mvdnes/rust,P1start/rust,untitaker/rust,emk/rust,miniupnp/rust,zaeleus/rust,nwin/rust,mvdnes/rust,philyoon/rust,AerialX/rust,pshc/rust,aidancully/rust,TheNeikos/rust,ktossell/rust,hauleth/rust,0x73/rust,zachwick/rust,reem/rust,emk/rust,ebfull/rust,rohitjoshi/rust,miniupnp/rust,GBGamer/rust,rohitjoshi/rust,aidancully/rust,0x73/rust,jroesch/rust,aepsil0n/rust,avdi/rust,victorvde/rust,hauleth/rust,jroesch/rust,KokaKiwi/rust,l0kod/rust,AerialX/rust,zubron/rust,untitaker/rust,AerialX/rust-rt-minimal,zachwick/rust,vhbit/rust,cllns/rust,pshc/rust,hauleth/rust,reem/rust,andars/rust,emk/rust,gifnksm/rust,quornian/rust,rprichard/rust,gifnksm/rust,GBGamer/rust,vhbit/rust,ktossell/rust,TheNeikos/rust,AerialX/rust,ejjeong/rust,AerialX/rust-rt-minimal,cllns/rust,l0kod/rust,kimroen/rust,robertg/rust,andars/rust,philyoon/rust,pelmers/rust,defuz/rust,KokaKiwi/rust,seanrivera/rust,andars/rust,AerialX/rust-rt-minimal,GBGamer/rust,emk/rust,dinfuehr/rust,richo/rust,TheNeikos/rust,P1start/rust,reem/rust,pshc/rust,jroesch/rust,rprichard/rust,victorvde/rust,zaeleus/rust,XMPPwocky/rust,zubron/rust,vhbit/rust,XMPPwocky/rust,kimroen/rust,vhbit/rust,graydon/rust,vhbit/rust,AerialX/rust,TheNeikos/rust,0x73/rust,jroesch/rust,mdinger/rust,krzysz00/rust,jashank/rust,barosl/rust,aidancully/rust,P1start/rust,aneeshusa/rust,mihneadb/rust,emk/rust,mahkoh/rust,pelmers/rust,jashank/rust,KokaKiwi/rust,jroesch/rust,sae-bom/rust,dwillmer/rust,graydon/rust,ejjeong/rust,aepsil0n/rust,pelmers/rust,graydon/rust,kimroen/rust,pshc/rust,aidancully/rust,0x73/rust,XMPPwocky/rust,dinfuehr/rust,quornian/rust,zachwick/rust,nwin/rust,carols10cents/rust,KokaKiwi/rust,zubron/rust,bombless/rust,richo/rust,ktossell/rust,dwillmer/rust,nwin/rust,quornian/rust,robertg/rust,jashank/rust,GBGamer/rust,mvdnes/rust,graydon/rust,mihneadb/rust,cllns/rust,sae-bom/rust,defuz/rust,seanrivera/rust,rprichard/rust,aneeshusa/rust,zaeleus/rust,mihneadb/rust,kwantam/rust,jashank/rust,mahkoh/rust,miniupnp/rust,bombless/rust,philyoon/rust,omasanori/rust,ebfull/rust,victorvde/rust,miniupnp/rust,nwin/rust,robertg/rust,avdi/rust,reem/rust,robertg/rust,zachwick/rust,dinfuehr/rust,avdi/rust,miniupnp/rust,pelmers/rust,sae-bom/rust,andars/rust,richo/rust,AerialX/rust,defuz/rust,dinfuehr/rust,untitaker/rust,barosl/rust,zachwick/rust,dinfuehr/rust,bombless/rust,robertg/rust,P1start/rust,sae-bom/rust,TheNeikos/rust,ruud-v-a/rust,aidancully/rust,mahkoh/rust,ebfull/rust,seanrivera/rust,jashank/rust,seanrivera/rust,kwantam/rust,mdinger/rust,kimroen/rust,mvdnes/rust,ruud-v-a/rust,dwillmer/rust,mahkoh/rust,omasanori/rust,aneeshusa/rust,AerialX/rust-rt-minimal,pelmers/rust,hauleth/rust,philyoon/rust,krzysz00/rust,reem/rust,gifnksm/rust,cllns/rust,aepsil0n/rust,rprichard/rust,l0kod/rust,aepsil0n/rust,bombless/rust-docs-chinese,krzysz00/rust,aidancully/rust,carols10cents/rust,rprichard/rust,ejjeong/rust,pshc/rust,avdi/rust,mdinger/rust,hauleth/rust,quornian/rust,GBGamer/rust,ejjeong/rust,ktossell/rust,aneeshusa/rust,kimroen/rust,zubron/rust,jashank/rust,XMPPwocky/rust,defuz/rust,miniupnp/rust,GBGamer/rust,nwin/rust,philyoon/rust,KokaKiwi/rust,pshc/rust,avdi/rust,carols10cents/rust,omasanori/rust,seanrivera/rust,mdinger/rust,zaeleus/rust,andars/rust,barosl/rust,ktossell/rust,barosl/rust,nwin/rust,quornian/rust,cllns/rust,sae-bom/rust,l0kod/rust,AerialX/rust,bombless/rust,jashank/rust,jroesch/rust,kimroen/rust,pshc/rust,dwillmer/rust,omasanori/rust,kimroen/rust,XMPPwocky/rust,dwillmer/rust,krzysz00/rust,untitaker/rust,untitaker/rust,rohitjoshi/rust,barosl/rust,ruud-v-a/rust,GBGamer/rust,omasanori/rust,rohitjoshi/rust,defuz/rust,ebfull/rust,zaeleus/rust,dwillmer/rust,ruud-v-a/rust,ktossell/rust,emk/rust,pshc/rust,ruud-v-a/rust,P1start/rust,jashank/rust,defuz/rust,l0kod/rust,aneeshusa/rust,carols10cents/rust,barosl/rust,rohitjoshi/rust,bombless/rust,miniupnp/rust,graydon/rust