fix rational vs float comparisons (attempt 2)

This fixes `FloatingPoint` vs `Rational` inequality comparisons (see #2960 and #8411), replacing #8463: unlike that attempt, it doesn't try to completely modify the whole dispatch system, so is much simpler, and less likely to break anything.

After this, the only remaining inexact comparisons should be `Rational` vs `MathConst`.