Separate canDetectGpus and findGpus futher, and fix tests
Renamed detect_gpus to findGpus so that no code can silently call
detect_gpus while forgetting to call the required canDetectGpus first.
Some test code is updated accordingly, which should have happened
earlier. The function with the new name now needs no return value, so
the formerly confusing return value of zero for success is no longer
present.
Shifted some more responsibilities from findGpus to canDetectGpus, so
that the latter now has responsibility for ensuring that when it
returns true, the former will always succeed.
Fixed tests that compile with CUDA, but cannot run unless there
are visible comatible devices and a valid context.
Refs #2347, #2322, #2321
Change-Id: I34acf8be4c0f0dcc29e931d83c970ba945865ca7