enable -Wdouble-promotion and fix resulting errors

There were a lot of doubles scattered into our math on accident.  This enables the
-Wdouble-promotion flag which makes these errors and fixes the resulting errors.

Thanks to trollcop for pointing this out.  Based on https://code.google.com/p/autoquad/source/detail?r=187