Bug 710818 - Overflow safe wrappers for acos/asin (now really)

acos() and asin() are only defined in a certain range. Implement some
range/overflow safe wrappers rather than potentially passing infinite
to other modules (e.g. cairo did assert() on it.)

Additionally check for !isinf() in cairo plug-in (should not trigger
anymore).