MatchTimeout.screenshot is the exact frame that wait_for_match saw

...instead of a frame captured a split-second after the match failure.

Why? So that the screenshot saved by `stbt run` (when the user's script
raises a `MatchTimeout`) shows exactly the same frame that failed the
match. We have seen situations where a UI item is *just* too slow to
appear, and fails a `wait_for_match`, but appears in the screenshot --
very confusing to users. More annoying still, sometimes there are minute
differences (in colour? brightness? encoder artifacts?) between
subsequent frames, such that a false no-match causes a `MatchTimeout` to
be raised but the screenshot saved by `stbt run` does actually match.

Another practical use is that the `MatchResult.frame` returned from
`wait_for_match` can be fed directly into, for example, an OCR function.

`MatchResult` now has a `frame` member. Each `MatchResult` yielded by
`detect_match` includes the video frame that `detect_match` checked, and
`wait_for_match` uses this frame for the `MatchTimeout.screenshot`
parameter, instead of calling `get_frame` to fetch a new frame from the
GStreamer pipeline.

Notes:

* The match visualisation (the red or yellow rectangle drawn on the
  video output) is done on a different copy of the frame that is
  attached to the `MatchResult`, so that users of the
  `MatchResult.frame` see a pristine screenshot.

* In `wait_for_match` we disable the pylint warning W0631 ("Using
  possibly undefined loop variable 'res'") because we know that
  `frames` (and thus `detect_match`) will always yield at least one
  frame, and thus `res` will always be set after the loop.

* In theory we should also apply a similar change to `MotionTimeout`,
  for consistency's sake; but I am not aware of any practical need for
  that.
stbt.ocr: Perform Optical Character Recognition using Tesseract

Tesseract is an open-source (Apache License 2.0) OCR engine.

Note that we use tesseract's command-line interface instead of an
existing Python wrapper, to avoid licensing restrictions
(python-tesseract and pyocr are GPL) and deployment difficulties (none
of the python wrappers are available in mainstream Linux distributions'
package repositories, so stb-tester users would have to use `pip` or a
similar Python packaging system). To use `stbt.ocr` you only need to
install Tesseract, which is available in Fedora ("tesseract"),
Debian/Ubuntu ("tesseract-ocr"), and macports ("tesseract") package
repositories.

TODO: Replace the `_Rect` class used by the image processing code with
the new `Region` class.

TODO: Add more-convenient ways of specifying a region. For example,
search for a label using `wait_for_match`, then specify the region
immediately to the right of that label (offsetting the region by the
width of the label template image).

Note that the unit test `test_ocr_on_static_images` violates our
standard 80-character line width, but only for the tabular test
data (which is more readable that way), not for the code. I think this
is an acceptable violation of the standard. Note that pylint only
applies this exemption inside of the array literal that contains the
"pylint: disable" directive.
stbt.ocr: Can specify Tesseract's page segmentation mode

If you have narrowed the region down to contain a single line of text,
you will often get better results with the `SINGLE_LINE` mode.

We default to Tesseract's default mode (fully automatic page
segmentation, but no Orientation or Script Detection).
stbt.Position: Tidy up docstring