Fix an issue with usage of isfinite
Depending on whether one includes <math.h> or <cmath> isfinite lives
in the global or in the std namespace, or in both. When compiling with
Kokkos <cmath> gets included, which no matter whether <math.h> gets
included before or after removes with some compilers isfinite from the
global namespace. Probably because it defines include guards, and it
undefines the isfinite macro which is defined in math.h.
This is a general issue in lammps where typically the C-header files are
used instead of the C++ header files. It might be worthwhile to think about
changing that.
The fix in this case is to replace isfinite with a Macro ISFINITE which is
appropriately defined.