When we call round without any argument on BigDecimal::NAN or
BigDecimal::INFINITY, a FloatDomainError should be raised.
Otherwise, the number shouldn't be altered. The problem is that JRuby
defines these constants according to BigDecimal.ZERO so when we apply
the rounding on it, it returns a float form of 0. Thus, we need to
short-circuit that and return the constant itself.