fixed deadlock with replica exchange and -maxh

Fixes #1273

Change-Id: Ib93cce59adf60afe0971944ef41df3a7d9883edc
Split cmake thread detection into core thread and thread_mpi.

This makes it possible to use core threading facilities
(mutex/cond-var/affinity, etc) on builds that don't use thread_mpi.

Change-Id: I0f0f43e86da642c4645fd7ac3c4796098cf9cd5e
Fixed deadlock on Mac OS X during thread affinity check.

During thread affinity setting, an erroneous #ifndef APPLE caused the Mac OS X
binary to enter the code path that assumes thread affinity support to exist,
leading to a deadlock later on. This is fixed, by making the printing of a
warning platform-specific, but not the rest of the code path, as presumably
originally intended.

Change-Id: I95bd808552869ece45efd1b818c1b5e1be03ed94
Fixed inconsistent locality_order array for thread affinity.

The locality_order array from gmx_cpuid (determining which threads
map onto which processors) is inconsistent if run with valgrind. This
patch checks the consistency and creates a fallback linear ordering if
that happens.

Change-Id: I59c0cef487134f9cb4115faf364dcfdad7f0d0e6
fixed DD internal state corruption with energy minimization

With energy minimization we need to reload old DD states after
steps are rejected. There were two bookkeeping issues in the reload.
This could lead to all kinds of, but no silent, errors.
Fixes #1272

Change-Id: Ia44c3bad27f3efdee76fa93dd281690e44dde700
Various fixes for genion

Remove genion non-random insertion of ions, by side effect it stops
writting useless log file. This commit also warns user about -conc
option overriding -nn or -np.

Fixes #1236, #615, and #1208

Change-Id: Icb7e411cda10abb3a7fea4137534f253b0777def
Add a GMX_NO_CREDITS variable to not show credits

It's annoying to get output loaded of credits messages, especially when
running scripts. This commit add GMX_NO_CREDITS environment variable,
when set no copyright is shown.

Related to #1267.

Change-Id: Ia8482a73bde733b08cb37680ecceb713560872f5
Fixes syntax for FAHCORE in CMakeLists.txt.

GMX_FAHCORE triggered a set_property() call that was missing
a PROPERTY identifier and thus triggered a cmake error message.
Syntax at
http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:set_property

Change-Id: I95108ba3332e6ce5c15a4dc4bfa165c3a8e3ac8f
Remove unused variables

Change-Id: I8c6ce4e83474d720bb8565453c13247132289e22
fixed minor g_bar output issues

Replaced one s_A by s_B in the help text.
Replaced %g by %f in all gmx_fatal calls.

Change-Id: I306703eace9c6b3251981d0b9f3a05bdc9c617ff
fixed a typo (unclosed bracket) that cause CMake to fail

Fixes #1280

Change-Id: I987c860052923602b0ce7e6837a6905ad81a9f22
fix CMake bug related to TestQPX.c location

cmake/TestQPX.c was not found because it lacked the
appropriate relative path.

Fixes #1281

Change-Id: I5fcc8598c91e39a86c337f14497b6d5faff91116
Merge branch 'release-4-6' into master

Conflicts:
	CMakeLists.txt
	cmake/ThreadMPI.cmake
	src/gromacs/gmxana/calcpot.c
	src/gromacs/gmxana/calcpot.h
	src/gromacs/legacyheaders/pull_rotation.h
	src/tools/CMakeLists.txt

Resolution was straightforward; always in favour of version already in
master branch. Removed calcpot.[ch].

Change-Id: I7ad7a6d9e34f30e04f71c52d707065c6e14b68f3