Fix test build with GMX_BUILD_MDRUN_ONLY

Removed the tests from such builds to resolve CMake errors.
The tests cannot in any case be run without non-mdrun code.
Got broken in I8072355.

Also moved the object library for gmx view such that it doesn't get
unnecessary built with GMX_BUILD_MDRUN_ONLY.

Change-Id: I52c19d695680f5bd94deaae712d2d10e3364dfa6