Make Cygwin build work
Originally CMake didn't provide C++ language version flags, so GROMACS
managed that itself. Now that GROMACS lets CMake manage it, we always
get the -std=c++17 flag, rather than (say) -std=gnu++17 to allow
extensions to the std headers. In various places, GROMACS relied on
POSIX functionality that is available by default on Linux, but on
Cygwin required the GNU extensions to the C++ language dialect. This
change fixes several such places, mostly by requiring the POSIX
extensions needed.
Removed an include of sys/syscall.h that was unused, unnecessary, and
only present on Linux.
Moved an inclusion of gtest.h from a header into a source file because
it was only needed there.
Fixed some warnings about unused things.