Use a better "rational GCD" for GCD of Rational and floating point number types.

This makes GCD for rationals match up with Mathematica. The GCD of 2 rational numbers p/q and r/s is gcd(p*s, r*q) / (q * s). This PR implements this for Rational, Float, Double, and BigDecimal, though being careful to be more efficient.