Fix/improve installation directory logic.
With the move to relative install paths (recommended by CMake), logic
that relied on the *_INSTALL_DIR variables for something else than
locations for the CMake install() command got broken. Explicitly added
CMAKE_INSTALL_PREFIX there.
Also improve the approach for customizing the installation directories:
- GMXLIB is now GMX_LIB_INSTALL_DIR, and a proper cache variable.
- Added a GMX_DATA_INSTALL_DIR to customize the directory under which
the data files get installed under share/. Use this also in the code
that searches for the data directory instead of hardcoding several
guesses.
Related, moved the logic of falling back to a hard-coded library
directory into get_libdir(); it was duplicated in two places.
Resolves part of #1271: creating a binary package with CPack and
installing it somewhere else than in the CMAKE_INSTALL_PREFIX
used to create it still breaks all the logic touched here. Also using
DESTDIR with 'make install' breaks it (but that has never worked).
Change-Id: I0271a8152f87dd59a229c9d0eca976404f974ea8