Make Time#to_r consistent with MRI

Let's make JRuby matches the behavior of MRI when calling to_r on a Time
object. It used to return only the numerator of the Rational object if
the denominator was equal to 1.
Merge pull request #1790 from robin850/time-to-r

Make Time#to_r consistent with MRI