Consolidate and fix logic for mdrun -nb and -gpuid
Several aspects of task assignment did not work as well as it should.
If gmx mdrun -gpu_id 01 is intended specify that work run on those
GPUs, then e.g. if the tpr uses the Group scheme, then mdrun should
refuse to run, just like it does for mdrun -nb gpu. Now it does
refuse.
gmx mdrun -nb cpu -gpu_id 01 should always give a fatal error, and now
does.
CUDA_VISIBLE_DEVICES="" gmx mdrun -nb gpu and the same with -gpu_id
should give a fatal error, and now does.
After this change, if the user has required short-ranged work on a GPU
with -nb gpu, or made an explicit GPU task assignment with -gpu_id
without using -nb cpu, exit quickly unless GPU support is compiled,
the Verlet scheme is active, and GPUs were found.
Introduced a helper function for whether compatible GPUs have been
found, to help improve encapsulation and readability.
Removed hack from mdrun integration tests that coped with early
implementations of -gpu_id, which is no longer needed.
Fixes #2067
Change-Id: Ic5091edc892b0fcb0371720a5000b80019b5b3d2