Fix issues with failing thread affinity setting
- Fix the conditional in MPI_Reduce() to correctly detect only a subset
of the ranks failing.
- Ensure that all ranks reach all the MPI_Reduce() calls to avoid
deadlocks on heterogeneous nodes, where only some nodes could fail the
consistency checks. As a side effect, always produce the final
message about failed affinity settings, together with its advice.
- Only do MPI_Reduce() if there are multiple ranks.
- Fix incorrect #ifdef (caused by rebasing the original change over the
change that made GMX_MPI 0/1-valued).
The last change seems to fix #1951.
Change-Id: I93c8c4bd6051c9077736f9fc19e6e0637c6d6435