Fix GMock to work on MSVC

This duplicates the logic of GMock's (pre-release) commit r675 in
order that GROMACS can build and test without problems on all MSVC
versions.

Change-Id: I8a7188d2d34fdfa2753a71291d8528e5c9753c6d
Adjust include directory order for some corner cases

Always add headers found from the source/build tree to the beginning of
the list of include paths, such that they are preferred over those
potentially found in other non-system directories.

Fixes #1539

Change-Id: Id79634073fea5b10f250128db8ab08019a7f9e21
Update some installation-related docs

- Add comments for installation-related variables in CMake, in
  particular the RPATH section that has caused some confusion.
- Document those few variables that can be used to alter the
  installation tree structure in the install guide.
- Reword some parts in the install guide about CMake iteration.
- Remove GMX_INSTALL_PREFIX, as there are other approaches to get the
  desired result with CPack that are less confusing.  This variable
  wasn't documented or probably used anywhere outside some dormant
  Jenkins jobs.

Change-Id: I199b06d905b45961313ed9fa44ae82e5987be0fe
Add running tests to install-guide

At least on architectures we don't test, it is necessary that the user
runs the tests. Because we don't have a way to query whether it is a
tested architecture every user should run the tests.

Also add a warning if unit tests cannot be build because libmxl2 wasn't
found.

Partial fix for #1548

Change-Id: I8b87cc77f909d5cf2a4ee70151096312e3191af2
Reinstantiate unsorted index group check

In most contexts, providing an index group with duplicate atoms or atom
indices not in ascending order results in the selection getting silently
evaluated incorrectly.  The selection engine now detects this case and
gives a fatal error, hopefully reducing confusion if such a case arises.

The case where an unsorted index group is provided as a sole value of a
selection is still supported.

Change-Id: I0b647a26d9a1b47da10c84bdd3d073412d166a75
Fix tng_num_frame_sets_get() with no frame sets.

When there are no frame sets the function returned an error.
This corresponds to commit 6f7862c7406b in the TNG repository.

Fixes #1540

Change-Id: I3df04d84ebd8fcdc6be76a446efa3209df363d23
Fix bug causing reading next frame not to stop.

Corresponds to commit e6e85d562829bca in the TNG repo.

Change-Id: I89ee3e7649c4cf832798d9e2ce61b397a1757579
Merge release-5-0 into master

Change-Id: I9813e3770c78f62c9003987b22c0315c89c87485