Version bump after 4.6.6 release

Change-Id: Ifac0db3a07caba28c123d233b54356a1db0d79ba
Added tests for denormal and underflow for simd exp()

The SIMD math functions are not expected to handle
the denormal range correctly, but it should at least
be clamped to zero rather than producing garbage
values. No changes required to the math function,
so it appears to pass these tests as-is.

Change-Id: I841c2948c81f6b62f42e60ff30ffd5e4f77926fa
Fixed PME bug with high OpenMP thread count

PME energies and forces could be incorrect with combined MPI+OpenMP
parallelization. This would, only, happen when
pmegrids->nthread_comm[YY] >= 2, which can only occur with high OpenMP
thread count with multiple large prime factors.
It's unlikely that this issue affected production runs.

Fixes #1572.

Change-Id: I03b38c279c8f8ab2e111dad0976edad88b3ea93b
Verify MD5 sum for FFTW download

Since ExternalProject provides confusing error messages with MD5
checking enabled, add a custom download step that works as expected.
When passed a local file as the URL, ExternalProject does the MD5
verification just fine, so the code now downloads the tarball in a
custom step and then passes that local file to ExternalProject.

This allows removing the lengthy security warning that appeared there if
one was just following the quick-and-dirty installation instructions,
and likely only confused novice users.  While this change may not
improve overall security significantly, it hopefully allows everyone to
agree to remove that warning and thus improve the end-user experience.

Change-Id: I9ac5a30ae5858b7a6557ccb2d981cc909457d020
Workaround for ICC 14

Problem was only present with BUILD_SHARED_LIBS=no

Change-Id: Ieb4377d819aa5eff3d139cdbe55775989118a738
Fix hang with LJ-PME and empty domains

With LJ-PME and DD domains with 0 atoms and LJ-PME mdrun could hang.
Fixes #1571.

Change-Id: Ie205954c4f5e1a52df846a69972f735867eea15d
Changed names of test files to avoid Fujitsu compiler bug

The Fujitsu compilers use an older version of the Clang
parser where certain static class initializers (e.g. strings)
are put in a static initializer function stub named after
the file and class. When the first such class has identical
names in two different files where the last part of the
name is identical, this will result in clashing symbols
at link time. Working around this would require an extra
(unused) class definition in each file that would pollute the
code, so for now we merely rename the files where it occurs
and hope that the compilers will be fixed (a bug report has
been submitted).

Change-Id: If552a06950facb0cdbb6e34e0b324aafa6083ae8
Fix portability issue with ArrayRef initializer overloading

Some compilers (in particular the Fujitsu compilers that are
derived from an earlier version of Clang) will not allow
overloading functions where one version uses a pointer to a
type, and the other a vector iterator to the same type - likely
because they have implemented iterators with pointers.
Regardless of what the C++ standard says, we need this working
on K computer, so this patch replaces the overloaded
initializers with non-member functions that create an ArrayRef
or ConstArrayRef either from pointers, an array,
or iterators.

Change-Id: I4c4e327c869920cc08e3f955e88cb3a5b28c7e87
Merge release-4-6 into release-5-0

Conflicts:
	CMakeLists.txt (version bump ignored)

Change-Id: I4ba0209b5f69b6470470530662a0b27390a02771
Check MD5sum for regressiontest

Because we decided it is important for FFTW we should do it for
the tests too. Is only done for non -dev versions.

Change-Id: Id7d1ee027bd302ad7cb10f46d93b0f435872c67e
Added checks for TPI + Verlet scheme

Change-Id: I040f4cc9dbb8ff25ed97d18cca0b4a2c1e7014b0
Replace __LP64__ with check for pointer size

The __LP64__ define is not set e.g. on PGI compilers,
so instead we use a portable way of checking for
pointer size based on defines from stdint.h.

Change-Id: Ib2dd6e45c2b168add07f5478d59aec487a91ab9e
Improve Gromacs portability

This patch addresses a few general portability issues
that we have experienced at least on Fujitsu compilers
(K computer) and (partly) for Pathscale x86 compilers.
- I have added a generic compiler definition fallback
  for boost, so it will work on unidentified compilers.
- There is now  a define for gmock-1.7.0 to handle
  the case where wcscasecmp() is not available. We use
  this by default since it is not important for us.
- If we do not find atomics for sparc64 we now warn and
  fall back on mutexes rather than the compile dying.
- The compiler flag checks have been updated from
  cmake-3.0, and more warning checks added.
- Since some non-GCC compilers set _GNUC_ for
  compatibilty, we do not assume all such compilers
  support tr1, but use the internal tr1/tuple definition
  in Gmock by default.
- Before using the sched.h affinity functions, we now
  check that all the functions we need are supported,
  rather than just one of them.

Change-Id: I31b7f0f46a9d03a627c73a0789b4a9b24fa860ee
Make internal BLAS/LAPACK messages less noisy

BLAS and LAPACK are close to insignificant to Gromacs, so
avoid multi-line noisy warnings about "fallback" solutions;
those will just worry users and make them spend time investigating
under what conditions it might play a role, when we really don't
care much for BLAS/LAPACK performance. Message has been
changed to short inconspicuous status lines when we are using
built-in versions.

Change-Id: I9f1b0c769907521d5cb6325c8d67cd61ca8a803a
Corrected SIMD math overflow documentation

Added more details to the SIMD pmecorr and exp documentation.
Corrected the source of the PME-LJ kernel overflow.

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

Conflicts (trivial):
	src/gromacs/commandline/pargs.cpp
	src/gromacs/gmxlib/gmx_thread_affinity.c
	src/gromacs/options/filenameoption.cpp

Manual changes required for ConstArrayRef:
       src/gromacs/commandline/pargs.cpp
       src/gromacs/options/filenameoption.cpp
       src/gromacs/selection/selection.cpp
       src/gromacs/selection/tests/nbsearch.cpp
Manual moved REGRESSIONTEST_MD5SUM from
       CMakeLists.txt to cmake/gmxVersionInfo.cmake

Change-Id: I1a2038f72c1e1cfed830de5c540ab278dbb39cfe