More files to C++.
Switch a few more files to C++ compilation and resolve issues found: add
several extern "C" declarations, remove unused variables, move some
static variables from headers to source files. Move gmx_ctime_r()
declaration to string2.h; it must be better to have one extra
declaration in an installed header than a mass of repeated declarations
in source files. Remove a hack in smalloc.h; the code that prompted
that seems to have been removed in the kernel reorganization for 4.6,
and we are anyways not yet compiling a lot of legacy code with C++.
Suppress most scanf() warnings in these files. Make cppcheck correctly
parse #ifdef __cplusplus blocks. Add gmx_isnan().
The motivation for this selection of files is that these files write
output files where either command_line() or Program() is used to
indicate the currently running program. Will replace those calls with a
uniform mechanism in a subsequent commit.
Change-Id: Ic1e90fcc08b1be6d4d6d257215f9523625ab347a