Extend the ceiling and floor generators for rational numbers.

TODO: Add comments and examples, add comparison-based product
calculation.
Add comparison-based calculation for some rational generators.

Modify the floored/ceilinged mul-by-frac generator's comparison code
to work in the general case too (when the multiplicand is not 1/Y).
Add similar comparison code for signed truncated mul-by-frac.