ENH: Improve finding of isnan and friends.

These functions can be defined in various ways:
1) in C++11 as std::isinf(), std::isnan(), std::isfinite() in <cmath>
2) in C99 as isinf(), isnan(), isfinite() in <math.h>
3) in pre-C99 extensions as isinf(), isnan(), finite() in <math.h>
4) on Windows as _isinf(), _finite() in <float.h>

Change-Id: I5817f43eb167c26bdfe6521ce5376262ba71b600
Merge topic 'better-math-function-finding' into master

17c5a4e8 ENH: Improve finding of isnan and friends.