Convert forcefield search to C++
- Convert gmx_directory_*() to a C++ class in directoryenumerator.*
(code moved from futil.* and converted to C++).
- Add some errno checks to detect error conditions better.
- Add a function to enumerate files/directories in all GMXLIB
directories to DataFileFinder, and use this to replace functionality
in fflibutil.cpp.
- Convert the code to enumerate forcefields into a C++ function with a
more descriptive name, and convert the choose_ff() function to C++ to
avoid complicated logic where the same directory is searched multiple
times with different functions.
This is mainly a rewrite of the code in C++, with only minor functional
changes:
- Unit tests of this code no longer get confused by GMXLIB being set
(currently, there are no such tests, though).
- Force fields are searched using the same logic as other data files
(the default directory is always searched).
- Some I/O errors are now handled with more descriptive errors instead
of silently ignoring directories that cannot be listed.
Change-Id: Ib3d070af5907ea00dfa9409e753868251eb8c7da