auto merge of #10050 : gifnksm/rust/ratio-methods, r=pcwalton
auto merge of #10050 : gifnksm/rust/ratio-methods, r=pcwalton

After merging 0ada7c7, user code have not been able to access to `Ratio`'s numerator and denominator fields.
In some algorithms, it is needed to get an rational number's numerator or denominator, but keeping these fields private is necessary for guaranteeing that `Ratio` numbers are irreducible.
So, I added the getter methods `numer()` and `denom()`.

As a bonus, this commit adds utility methods relating to the ratio-integer conversion.

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