Fix AS::NumberHelper results with rationals

:precision was incorrectly being applied to Rationals

before:
  ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
  => "3.3"
after:
  ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
  => "3.33"
Merge pull request #15379 from xuanxu/rational_precision

Fix AS::NumberHelper results with rationals