Improve ProgramInfo and use it everywhere.
- The ProgramInfo class now stores the full command line.
Moved functionality to add quotes to arguments with spaces from
gmx::test::CommandLine to ProgramInfo.
- ProgramInfo initialization is now protected by a mutex for
completeness.
- oenv.c and statutil.c now use ProgramInfo internally to store/return
the binary name and command line. Removes duplicate implementations
of this functionality. Required changing the return values of
ProgramInfo methods from std::string values to const references.
- Removed many unnecessary #include directives from these two files.
- Fixed warnings that were produced from these files when switching them
to C++ compilation (one cppcheck warning suppressed for now).
- Add a temporary hack for Windows to try to make get_libdir() work for
tests that are run through CTest.
Helps with #950.
Change-Id: I1bfd4231b8b7055d0a014b41be67a7c1c99e36b0