Change various std.math.isXXX into templates

In short, this changes behaviour in the following ways:

- Allows inlining where previously was not possible.
- Operations on double/float that call these functions stay in XMM registers rather than copied to/from the stack pointer (though DMD passes reals via st(0), no?)

~~The only change I have a question about is the last one.  Restricting copysign to the signature ``R (R, R)`` may not be ideal, as ``float x = copysign(float, double)`` won't work, where as before it would have done.~~

Nevermind, I decided for myself what the better choice was.
They're used consistently throughout this 5.7k LOC module.