OCR: Support tesseract writing to files with any extension

The second argument to the tesseract command line tool is "output base"
which is a filename to which an extension will be appended.  Unfortunately
this extension varies depending on the arguments passed to tesseract and
even varies between different versions of tesseract[^1].

Using a temporary directory means that we don't need to know the extension
in advance and we can read the output independent of the extension that
tesseract appends.

[^1]: In hOCR mode tesseract 3.02 will write to base.html whereas 3.03 will
      write to base.hocr.
Refactor: _tesseract: Require that a frame to be passed in

This removes a dependency on `Display` from `_tesseract` making it a pure
function depending entirely on it's arguments and producing no
side-effects[^1].  This makes uses of it clearer.

[^1]: Or close enough.
Refactor: _tesseract: Allow passing a `Gst.Sample` as frame

`match_text`, which will be added in the next commit, will return the
timestamp of the frames it analyses.  To do this it will need the extra
metadata attached to `Gst.Sample` that is not available when dealing with
images in `numpy.ndarray` format.  To support this this commit introduces
the ability to pass a `Gst.Sample` to `_tesseract` itself.  It has the
pleasant side-effect of reducing copying.
OCR: Add ability to pass configuration to tesseract

tesseract has many configuration values controlling many aspects of the
OCR algorithm.  For instance `tessedit_char_whitelist` can be used to
only recognise certain charactors such as numbers and
`language_model_penalty_non_dict_word` controls the strength of the
dictionary.  Depending on the situation the user

Ideally we wouldn't expse this level of complexity to the user, but after
experimentation it seems that OCR is an inherently complex field, so this
commit directly exposes the controls that tesseract provide.  This is
better than us adding an additional layer of abstraction/obfuscation in
an attempt to make it simpler for the user.  Once we learn more about the
circumstances under which each configuration value is useful we can
publish recommendations in the documentation.
OCR: Add ability to pass user_patterns and user_words to tesseract

tesseract uses a dictionary to help choose the correct words from the
list of possibilities it produces.  This is helpful when reading real
words but can get in the way of reading serial numbers.

This commit allows the user to help tesseract by giving it hints about
the words it's reading.  This takes the form of adding words to
tesseract's dictionary and adding patterns for tesseract to recognise.

Unfortunately the pattern language is specific to tesseract, and while
it bears some resemblance to regexs the impedance mismatch between the
tesseract pattern language and regex is high enough that a mapping would
be impractical.  As a result the pattern language is exposed verbatim.
Documentation can be found in the tesseract source code[1].

[1]: https://code.google.com/p/tesseract-ocr/source/browse/trunk/dict/trie.h?spec=svn894&r=894#188
validate-ocr: Improve error reporting if no image is found
validate-ocr: Don't consider all `.txt` files as tests

Previously if you had a `README.txt` in your corpus directory validation
would fail as it was expecting a PNG image called `README`.