Encode RealFloat numbers using Scientific.fromFloatDigits

The previous code used realToFrac (fromRation . toRational) which
approximates a floating point value. For example:

 > toRational (1.2::Double)
 5404319552844595 % 4503599627370496

If you encode this Rational number to a Scientific number and render it
you get:

 > encode (1.2::Double)
 "1.1999999999999999555910790149937383830547332763671875"

Using Scientific.fromFloatDigits you get the expected:

 > encode (1.2::Double)
 "1.2"
Nicer ToJSON instance from Number and Integer