rustdoc: Better sorting criteria for searching.
rustdoc: Better sorting criteria for searching.

This essentially rewrites the sorting algorithm, which relied on
the implementation-defined handling of non-consistent sorting function
(cf. ECMA-262 5th edition, section 15.4.4.11)
and was also a bit inefficient.

The new criteria expands the prior criteria while adding these ones:

- The current crate is always preferred over other crates.
  (Closes #13178)
- An item with a description is preferred over one without it,
  if item names match. This is a heuristic assuming that
  the documented item is more likely to be relevant.
- An item with no literal occurrence of search query is handled correctly.

l0kod/rust,pshc/rust,ejjeong/rust,zubron/rust,TheNeikos/rust,l0kod/rust,l0kod/rust,reem/rust,avdi/rust,ruud-v-a/rust,nwin/rust,ruud-v-a/rust,P1start/rust,AerialX/rust,aepsil0n/rust,barosl/rust,GBGamer/rust,philyoon/rust,andars/rust,cllns/rust,AerialX/rust-rt-minimal,rohitjoshi/rust,ebfull/rust,rohitjoshi/rust,miniupnp/rust,ktossell/rust,victorvde/rust,aneeshusa/rust,omasanori/rust,pelmers/rust,bombless/rust,seanrivera/rust,avdi/rust,mdinger/rust,barosl/rust,sae-bom/rust,quornian/rust,rohitjoshi/rust,P1start/rust,jbclements/rust,dwillmer/rust,vhbit/rust,hauleth/rust,aepsil0n/rust,ejjeong/rust,hauleth/rust,carols10cents/rust,vhbit/rust,nwin/rust,l0kod/rust,P1start/rust,pelmers/rust,P1start/rust,nwin/rust,barosl/rust,defuz/rust,defuz/rust,retep998/rand,zaeleus/rust,vhbit/rust,P1start/rust,zachwick/rust,ejjeong/rust,gifnksm/rust,carols10cents/rust,emk/rust,miniupnp/rust,kwantam/rust,kimroen/rust,ktossell/rust,pshc/rust,ebfull/rust,jashank/rust,aturon/rust,zubron/rust,aepsil0n/rust,dinfuehr/rust,emk/rust,XMPPwocky/rust,gifnksm/rust,mihneadb/rust,ktossell/rust,ruud-v-a/rust,zubron/rust,omasanori/rust,rohitjoshi/rust,GBGamer/rust,emk/rust,philyoon/rust,jbclements/rust,TheNeikos/rust,graydon/rust,robertg/rust,nham/rust,hauleth/rust,kwantam/rust,andars/rust,KokaKiwi/rust,dwillmer/rust,hauleth/rust,l0kod/rust,nham/rust,erickt/rust,KokaKiwi/rust,robertg/rust,stepancheg/rust-ide-rust,krzysz00/rust,dwillmer/rust,carols10cents/rust,quornian/rust,ktossell/rust,servo/rust,zachwick/rust,jroesch/rust,XMPPwocky/rust,pczarn/rust,gifnksm/rust,stepancheg/rust-ide-rust,seanrivera/rust,bombless/rust,aidancully/rust,GrahamDennis/rand,gifnksm/rust,rprichard/rust,AerialX/rust-rt-minimal,mahkoh/rust,jashank/rust,XMPPwocky/rust,nham/rust,AerialX/rust-rt-minimal,aturon/rust,servo/rust,jashank/rust,mdinger/rust,ejjeong/rust,Ryman/rust,rprichard/rust,bluss/rand,pczarn/rust,mvdnes/rust,robertg/rust,Ryman/rust,mdinger/rust,mvdnes/rust,defuz/rust,nham/rust,krzysz00/rust,quornian/rust,bombless/rust-docs-chinese,philyoon/rust,mihneadb/rust,untitaker/rust,jroesch/rust,erickt/rust,omasanori/rust,carols10cents/rust,gifnksm/rust,miniupnp/rust,aidancully/rust,erickt/rust,0x73/rust,cllns/rust,dinfuehr/rust,emk/rust,jbclements/rust,AerialX/rust,miniupnp/rust,ruud-v-a/rust,ktossell/rust,jbclements/rust,Ryman/rust,achanda/rand,barosl/rust,vhbit/rust,untitaker/rust,jroesch/rust,cllns/rust,pczarn/rust,zubron/rust,krzysz00/rust,philyoon/rust,ejjeong/rust,zubron/rust,krzysz00/rust,aneeshusa/rust,rohitjoshi/rust,untitaker/rust,AerialX/rust-rt-minimal,KokaKiwi/rust,jroesch/rust,jroesch/rust,GBGamer/rust,huonw/rand,jbclements/rust,seanrivera/rust,jroesch/rust,ebfull/rust,rprichard/rust,pshc/rust,bombless/rust,zaeleus/rust,GBGamer/rust,nham/rust,jashank/rust,rprichard/rust,mdinger/rust,waynenilsen/rand,pelmers/rust,dwillmer/rust,0x73/rust,philyoon/rust,hauleth/rust,0x73/rust,richo/rust,barosl/rust,servo/rust,miniupnp/rust,avdi/rust,jbclements/rust,miniupnp/rust,avdi/rust,Ryman/rust,kwantam/rust,mihneadb/rust,AerialX/rust,aneeshusa/rust,zubron/rust,GBGamer/rust,aturon/rust,0x73/rust,aepsil0n/rust,kimroen/rust,aneeshusa/rust,mvdnes/rust,rohitjoshi/rust,pczarn/rust,jbclements/rust,Ryman/rust,ebfull/rand,aidancully/rust,AerialX/rust-rt-minimal,pczarn/rust,jashank/rust,vhbit/rust,carols10cents/rust,aepsil0n/rust,TheNeikos/rust,XMPPwocky/rust,shepmaster/rand,nwin/rust,AerialX/rust,pshc/rust,l0kod/rust,victorvde/rust,quornian/rust,XMPPwocky/rust,aepsil0n/rust,pczarn/rust,mahkoh/rust,aidancully/rust,erickt/rust,kimroen/rust,bombless/rust,dwillmer/rust,vhbit/rust,aturon/rust,omasanori/rust,emk/rust,jashank/rust,robertg/rust,dwillmer/rust,miniupnp/rust,dinfuehr/rust,pshc/rust,GBGamer/rust,aidancully/rust,KokaKiwi/rust,victorvde/rust,servo/rust,pelmers/rust,mahkoh/rust,pshc/rust,pelmers/rust,sae-bom/rust,kimroen/rust,barosl/rust,robertg/rust,krzysz00/rust,mvdnes/rust,defuz/rust,philyoon/rust,jbclements/rust,Ryman/rust,ruud-v-a/rust,P1start/rust,rprichard/rust,cllns/rust,mdinger/rust,reem/rust,sae-bom/rust,untitaker/rust,pshc/rust,TheNeikos/rust,aneeshusa/rust,reem/rust,aturon/rust,seanrivera/rust,zachwick/rust,dwillmer/rust,aturon/rust,ktossell/rust,cllns/rust,sae-bom/rust,quornian/rust,richo/rust,aidancully/rust,dinfuehr/rust,servo/rust,mahkoh/rust,sae-bom/rust,TheNeikos/rust,mahkoh/rust,0x73/rust,gifnksm/rust,nwin/rust,XMPPwocky/rust,emk/rust,aneeshusa/rust,omasanori/rust,andars/rust,nham/rust,bombless/rust,jashank/rust,bombless/rust,servo/rust,reem/rust,0x73/rust,aturon/rust,hauleth/rust,sae-bom/rust,defuz/rust,kwantam/rust,emk/rust,graydon/rust,mvdnes/rust,ktossell/rust,mihneadb/rust,stepancheg/rust-ide-rust,nwin/rust,l0kod/rust,zaeleus/rust,AerialX/rust,avdi/rust,quornian/rust,richo/rust,graydon/rust,kwantam/rust,l0kod/rust,0x73/rust,dinfuehr/rust,jroesch/rust,ruud-v-a/rust,victorvde/rust,untitaker/rust,KokaKiwi/rust,rprichard/rust,seanrivera/rust,kimroen/rust,zubron/rust,GBGamer/rust,graydon/rust,stepancheg/rust-ide-rust,servo/rust,zaeleus/rust,cllns/rust,zaeleus/rust,mihneadb/rust,victorvde/rust,mahkoh/rust,untitaker/rust,seanrivera/rust,Ryman/rust,erickt/rust,bhickey/rand,andars/rust,stepancheg/rust-ide-rust,reem/rust,mvdnes/rust,zachwick/rust,jashank/rust,robertg/rust,andars/rust,arthurprs/rand,pelmers/rust,andars/rust,richo/rust,richo/rust,nham/rust,avdi/rust,graydon/rust,erickt/rust,ebfull/rust,miniupnp/rust,kimroen/rust,jroesch/rust,AerialX/rust,vhbit/rust,zaeleus/rust,zachwick/rust,zubron/rust,ebfull/rust,quornian/rust,dwillmer/rust,ebfull/rust,richo/rust,victorvde/rust,mihneadb/rust,krzysz00/rust,nwin/rust,reem/rust,zachwick/rust,jbclements/rust,GBGamer/rust,defuz/rust,vhbit/rust,graydon/rust,omasanori/rust,ejjeong/rust,pczarn/rust,TheNeikos/rust,pshc/rust,nwin/rust,erickt/rust,barosl/rust,kimroen/rust,stepancheg/rust-ide-rust,stepancheg/rust-ide-rust,mdinger/rust,kwantam/rust,AerialX/rust-rt-minimal,carols10cents/rust,P1start/rust,dinfuehr/rust,KokaKiwi/rust