Refactor logic for finding share/top/ files
Refactor the logic of how gmxlibfn() finds the library files into a
separate C++ class that provides some support for customization.
By itself, this change only rewrites the existing logic into C++ with a
few minor functional changes:
- unit tests no longer get confused if GMXLIB is set, and
- the default data directory is searched even if GMXLIB is set,
removing the need to duplicate all the files into custom directories
and/or to manually specify the default directory.
However, it also lays the groundwork for further refactoring:
- consolidating the other direct use of GMXLIB env.var. from
fflibutil.cpp into the same place
- more reusable logic for finding the files, e.g., for JIT compilation
or for structuring the data files into more than one directory
- removing one-off uses of functions like low_libopen
Change-Id: I4e14a7e7f11846b3828265c1c735da6bc57f97ff