Fixed g_rmsdist NOE calculation

This fix solve a series of bugs in NOE calculations:
1) incorrect number of frames in the calculation of the average distance
2) wrong selection of equivalent atoms
3) -equiv was wrongly documented

Change-Id: Icc6bbed0e1ba65774ad470c3edbd7a6a96e63ee6
Issue warnings for potential switch w/o defining switch regions.

If either older style switches or new potential-switch modifiers are
used, issue a warning if the PME regions is too long, resulting in
inaccurate energies. Also issue a warning if rvdw_switch is 0, which
occurs if no value is specified.

Discussion is in redmine #1463

Change-Id: I7a2c29f87ceb04712aab5076ac97f5f22f573671
Fix memory error in asc format IO

Found with cppcheck 1.64

Change-Id: I72e80cd2b11559be47d449d0a8d444857843979b
Removed truncation of nrdf in v-rescale thermostat

The resampling function for the v-rescale thermostat expected an
integer value for nrdf, but a real was passed, which was truncated.
With a single coupling coupling group nrdf is analytically an int,
but could be off by a bit. The could lead to incorrect kinetic
energy fluctuations (averages were correct).
Now fractional nrdf's are properly handled for nrdf > 3.
For nrdf < 3 a check is added for integer values with a small margin
for rounding.
Fixes #1218

Change-Id: I4c60c337f9874d0bff51220ad09429140be2a056
Merge branch release-4-6 into release-5-0

Conflicts:
	src/gromacs/mdlib/coupling.c

Resolved in favour of release-4-6, except that the underlying
RNG calls are now made to the new cycle-based RNG.

Run uncrustify

Change-Id: I56286e19632ac28958a0d4ef60ff09b875aa3005
Merge "Merge branch release-4-6 into release-5-0" into release-5-0