make dist: Make release tarball generation even more deterministic

With this commit the generated tarball doesn't depend on the user that
ran `make dist`.  It makes the tarballs identical whether run on my Debian
or my Ubuntu 12.04 docker container.

This is an extension to the work started in ce079fe.

Tested with:

    make -B dist && md5sum stb-tester-$(<VERSION).tar.gz
make check: Disable pylint 1.2's "Wrong hanging indentation"

Pylint 1.2's C0330 (Wrong handing indentation) gives false positives:
https://bitbucket.org/logilab/pylint/issue/232
Merge pull request #161 from wmanley/pylint-1.2-compat

make check: Disable pylint 1.2's "Wrong hanging indentation"
Revert ".travis.yml: Install `stbt` for the `runner` self-tests"

This reverts commit 99ed926946648b8f31676b279843ce14ff053811.

This isn't necessary since 4ffa6b6c.
Debian package: Build dependencies for selftests

python-yaml is used by tests/validate-ocr.py -- even though `make check`
doesn't run that script, it does run pylint over it.

The tesseract German language pack is needed for
test_ocr.test_user_dictionary_with_non_english_language and
test_ocr.test_that_ocr_reads_unicode.
stbt-control: Remove unnecessary runtime dependency on nose

The functionality in stbt-control doesn't require nose, but it's tests
did.  Unfortunately as we were using `nose.tools.raises` to decorate
a top level function so we had to import `nose.tools.raises` at the top
level intoducing an unnecessary dependency even when not running the
tests.

This is a little less declarative but is still quite readable and seems to
be better than the alternatives such as moving the test into a different
file or conditionally defining the test function.
Debian package: Install tesseract English language data

Because `stbt.ocr`'s `lang` parameter defaults to English.

On Fedora the English language data is already included in the base
tesseract package.
Merge pull request #164 from drothlis/packaging-dependencies

A couple of missing build- and run-time dependencies I noticed when
building stb-tester from scratch on a new Ubuntu 14.04 system.
Merge pull request #160 from wmanley/deterministic-tarballs

make dist: Make release tarball generation even more deterministic
stbt.py: Fix Ctrl-C ignored since port to GStreamer 1.0

When the GLib mainloop is constructed through the default Python
constructor it adds a signal watch on SIGINT[1].  This is a python
override[^2] ostensibly to "Retain classic pygobject behaviour of quitting
main loops on SIGINT".  This commit uses the non-override MainLoop
constructor which is more conservative and doesn't add a signal watch.

This change is not without side-effects.  The adding of the signal watch
was causing GLib to create another thread called "gmain".  In my
experiments it seems that our own `_mainloop` wasn't being used (or at
least wasn't necessary) at all.  After this change the "gmain" thread is
no longer created and callbacks are running on our `_mainloop` as expected
from reading the code.

This commit exposes (or at least highlights) that the mainloop code isn't
quite right.  In my tests I get the message "teardown: Source pipeline did
not teardown gracefully" whether I Ctrl-C or not.  This behaviour is,
however, present before this commit, so is not a regression caused by this
commit.

Fixes #138.

[^2]: The new GObject Python bindings are automatically generated from the
      C sources, and so method calls should behave identically to if they
      were made from C.  Overrides are where there is additional code added
      to the bindings for a particular language - in this case Python.

[1]: https://git.gnome.org/browse/pygobject/tree/gi/overrides/GLib.py?id=3.10.1#n513
Tests: Fix typo

The tests actually test SIGTERM not SIGINT.
Display: Fix ungraceful teardowns (with delays) with non-live sources

To shut down the source pipeline it should be sufficient to just call
`source.set_state(Gst.State.NULL)`.  In 52579fad we started attempting a
more graceful shutdown of our source pipeline by sending EOS to it instead.
This was a workaround for buggy BlackMagic GStreamer elements.

Unfortunately this slows teardown down for the cases that don't need
graceful teardown.  For non-live elements which can provide frames at a
high rate there can be sufficient frames in the pipeline to slow teardown
by over 10s in which case stbt considers graceful teardown to have failed.

This commit flushes the pipeline, dropping all buffers currently making
their way from source to our appsink, before sending EOS.  This means EOS
arrives promptly and teardown happens much more quickly.
Refactoring: Tidy up `appsink_await_eos()`

No functional change, just tidier.  I was making modifications in the area
so I thought I'd tidy this up too.