Revert to the previous behaviour of returning rational/integer for the sine/cosine
of rational/integer (instead of double).

The motivation is that with the new behaviour we would end up mixing C++ floats
with rat/int in the substitution routines. This had two nasty effects:
* converting exact quantities (int/rat) to floating-point (with all the connected
  fp nastiness),
* change the susbtitution result type to a series with floating-point coefficients,
  which is not what one generally wants when working with exact quantities.