Fix gmxtest with CRLF

Depending on the perl version the CRLF input
on Windows messed up the empty line detection.
Jenkins uses Strawberry perl. Now it also works
with msys.

Change-Id: I149dc4756a4a4a7964f04464d250d05d8c3197be
Updated discorr and warnings from 4.6 free energy merge

This updates the dispersion correction terms in the
reference energy files due to the switch/shift changes
previously introduced in the 4.6 branch, and now merged
into 5.0. The warnings have also been updated to fix a typo.

Change-Id: Idb7fe1498cc7b30f91475efa84db8b917a8b6952
Fix position restraint B-state fields

We now fill the B-state fields for position
restraints in the tpr, so test cases that use
position restraints must have their .tpr updated.

Refs #1399

Change-Id: Ic84f9d9627a59d9e32ec3ba817a345d5c76845f7
Permit test cases to limit their own parallelism

Test cases are sometimes small by design, and some of them use
algorithms that are only available if there is a single rank. The
test harness can now be told do do the right thing without needing to
run the test in default mode and adapt to failure. Used this
for several test cases.

Also added equivalent functionality to limit the number of
OpenMP threads, but this is unused for now.

Refs #1534

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

Change-Id: Ia09f65d68573cdbd740d5f838eb22bc454b95d38