vtkTesting: Refactor RegressionTest, eliminating hard-coded cout

The new method RegressionTestAndCaptureOutput may be called instead,
passing in cout whenever output should go to stdout. The existing
method RegressionTest simply delegates to the new method, with output
still going to cout, just like it always has.

Elaborate on the documentation of these methods, too.

Change-Id: Iceb6708af6d7eca889ee998f061525e2fdd36a3b
vtkTesting: If test fails with back buffer, try front buffer too

Typically, the image testing is done using the back buffer
to avoid accidentally capturing overlapping window artifacts
in the image when using the front buffer. However, some graphics
drivers do not have up to date contents in the back buffer,
causing "failed" tests even though, upon visual inspection, the
front buffer looks perfectly valid...

So: if the test failed using the back buffer, re-test using the
front buffer. This way, more tests pass on dashboards run with
the Intel HD built-in graphics drivers.

Emit the output from whichever regression testing call has the
smallest image difference.

Change-Id: Ibb1326a5494ca91a34cb619d134fce63f51bd8eb
Merge topic 'use-front-buffer-if-back-buffer-fails' into master

e136e01e vtkTesting: If test fails with back buffer, try front buffer too
37c4a68b vtkTesting: Refactor RegressionTest, eliminating hard-coded cout