Fix regression and overflow bug for rationals.
auto merge of #17248 : jbcrail/rust/fix-rational-rounding, r=alexcrichton

When I fixed the previous issue with rational rounding, I had introduced a regression. There was also an overflow bug introduced for fixed-precision rationals. This patch corrects both bugs.