util: Make Rational a Number/Comparable; add Range#inRange

* Also changes Rational to reduce the numerator/denominator by
its greatest common divisor at construction time (e.g. (2/4 -> 1/2)).

Bug: 15432042
Change-Id: Ib827abccf44a040667e5931cf9442afc86b57e2d
5 files changed