fixed mdrun -cpi SD and pcoupl initialization

With mdrun -cpi and no previous output files present SD and pressure
coupling were initialized incorrectly, leading to minor differences
at the start of a simulation. Fixes #939

Change-Id: I1ea3797ceb39760341c7c11cf74425c02dcaf235
re-introduced fix for real/double issue in gmx_density

The float density histogram could overflow for large data sets.
A fix replaced 3 of the 4 pointers to floats by pointers to doubles, leading
to compilation issues. In two steps these replacements were reverted.
Now all 4 pointers have been replaced.

Change-Id: I0d8e38d27ac5c469480ff731ad191d869f5d890f
added explicit sqrtf to the float version of norm

Additionally, as inlining is not a concern nowadays, also cleaned up the
code by using iprod in norm.

Change-Id: Iabc237906380f848e16ed158809bf22b1de9ddd0
Use External BLAS/LAPACK by default

Check if Blas/Lapack is available and only use internal
if it isn't found

Updated FindLAPACK to 2.8.8. and included FindBLAS
so that it works without Fortran enabled.

Change-Id: I6d1df8a03196d9c14436d5b70c731d36b4ddf823
Revised g_tune_pme

1. Now, g_tune_pme only duplicates mdrun options where necessary,
options not understood by g_tune_pme are simply passed over to mdrun.
2. Users can now set minimum and maximum Coulomb radius iso scaling
factors for rcoulomb and the Fourier grid.
3. As a result of 1 and 2, some cleanup of the code was possible and
unneeded code was removed.
4. For -npme auto, the tool now derives a reasonable number of PME-
only nodes from the .tpr file settings and tests values around this
number.
Change-Id: I88af5d38a61e0409613f5f3fd4272f7f43823f64
Make load_vmd_library static

Was already used only within the same file

Change-Id: I43276424d51021bc8247c04a3c3647f7fc1565f7
Continuing to fix threading on Cygwin

Fixes #833

Change-Id: I5d577a149ad18b295559f6d87c24dc42bffd281e
Fix Clang 3.1 warning

grid_spacing is an integer and thus it was always set to 0

Change-Id: Id10bccdadef8f2630631d638e94bd27d78774536
Merge "added explicit sqrtf to the float version of norm" into release-4-6
Fix editconf real-bool misusage

Bool variable was declared as real. Caused invalid stack read
in double precision. Could have caused wrong value to be printed
for argument display but couldn't have caused wrong behavior.

Found with AddressSanitizer

Change-Id: I32553b1a898fb3a7f072ae177518dd63fad56dde
Merge "Continuing to fix threading on Cygwin" into release-4-5-patches
Merge "Revised g_tune_pme" into release-4-6
Removed dependency on windows.h through commrec.h, domdec.h.

Change-Id: If40506b521a4b4690506465a3f421dab93bc9ce6
Fix use after free in g_anaeig projection code.

PBC removal structure was deleted immediately after it was initialized,
and used afterwards.

Change-Id: I6126967b34e8de289370dede79cc50a9924ac34d
Replace our fftpack version with Numpy's version

Fixes incorrect results for vectors with length of multiples of 12

Fixes #946

Change-Id: I9a110de7334cbb96a72d0ced73ade4d55f665fee
Merge "Replace our fftpack version with Numpy's version" into release-4-5-patches
Merge "Use External BLAS/LAPACK by default" into release-4-6
Merge release-4-5-patches into release-4-6

Changes in 4.5 for removed lines/files in 4.6:
	Makefile.am
	include/domdec.h
	include/domdec_network.h

Trivial conflict:
	include/types/commrec.h

Fixed GMX_THREADS into GMX_THREAD_MPI for those added in 4.5 in:
        include/mdrun.h
        src/gmxlib/shift_util.c
        src/mdlib/gmx_fft_fftw3.c

Change-Id: Id37bfbbacc945a7cf184fa21313c05e2680e1fba
Merge release-4-6 into master

Conflicts:
	src/mdlib/CMakeLists.txt
          change applied to src/gromacs/mdlib/CMakeLists.txt
	src/tools/gmx_tune_pme.c
	  trivial conflict

Moved:
	src/mdlib/fftpack.c & src/mdlib/fftpack.h to src/external/fftpack

Fixed paths in COPYING-OTHER and added boost and gtest/gmock.

Moved the copyright header and list of modifications from fftpack.c into
new README file. Reduces modifications to original file.

Fixed header location in src/gromacs/mdlib/gmx_fft_fftpack.c.

Added macros.h to g_tune_pme (fixing missing min/max)

Change-Id: I9324b1695412e21d16bdcb4d2dc316c53356da5f