Add scripts for creating Ubuntu PPA with our dependencies

When we migrated to GStreamer 1.0 we had to patch some regressions
which had made their way into GStreamer since 0.10.  These patches
have been submitted upstream but not yet made their way into a
stable release of GStreamer, let alone the major distros.  This
makes it very difficult for our users to install and deploy
stb-tester.  This is an attempt at simplifying this process by
providing appropriately patched versions of our dependencies in an
Ubuntu PPA.

This also includes a dkms package to allow distributing a patched
version of the uvcvideo driver.  This is required for Smart TV
support with the Logitech C920 driver.

The code isn't beautiful but it lives in extra/ and is a tools
for maintainers rather than users or developers.
PPA Support: disable `make check` as a part of building Debian package

Disable `make check` for now as it gives us difficulty on Ubuntu's PPA
build farm.  Specifically the lack of a terminal prevents expect from
working and there are timing issues due to the load the build machines are
under.

This commit should be reverted once these issues have been investigated
and resolved but for now PPAs are more important.
PPA Support: Add make target `make ppa-publish`

This makes it easy to publish stb-tester packages for Ubuntu.
Misc: Fix typo in error message

Instead of "usedwith" it says "used with".
stbt.py: Fix `stbt._set_config` for sections which don't yet exist

Bug discovered when trying to set a config item in an empty config file.
pylint 1.1 support: `disable-msg` is deprecated in favor of `disable`

This is a warning on pylint 1.1.  `disable-msg` was deprecated in 0.21.0.
Our oldest platform (Ubuntu 12.04) has 0.25.
Merge pull request #125 from wmanley/ppa

 Create Ubuntu PPA including our dependencies
Add automated test involving video capture hardware

This is a nascent attempt to write some automated tests to ensure that
stb-tester continues to work with all our current supported hardware.  It's
currently very basic but works.  The intention is that in the future we
will have a test rig such that all commits are tested with real hardware
to prevent future regressions.

The test is currently very basic, it just checks to see if something major
goes wrong but in the future we can add greater control over the input
to the hardware (e.g. using a Raspberry Pi) to measure other properties
such as quality, latency, startup/shutdown time, ability to recover from
video loss, ability to handle HDMI renegotiation, etc.
Hardware tests: Add test_blackmagic_intensitypro
Rename tests/{hardware-test => hardware}

For consistency with tests/ocr
Move all utility functions from tests/{run-tests.sh => utils.sh}

This keeps all the utility functions used by the self-tests in a single
place.
tests/run-tests.sh: Test suites passed on command line must be relative to caller

...not relative to `run-tests.sh`. This will allow me to move the
hardware-specific test suite into tests/hardware/ in a future commit (so
that it doesn't get run by default).

This changes the command-line API of run-tests.sh but that is a change
that only affects developers, not users, of stb-tester.
Run hardware tests with `make check-hardware`

Instead of `STBT_ENABLE_HARDWARE_TESTS make check-integrationtests`. I
feel that a separate `make` target is better documentation than having
to read the source code of test-hardware.sh. Also, this allows us to run
the hardware tests separately (for example only after the non-hardware
tests have passed).

To exclude the test cases in `tests/test-hardware.sh` from `make
check-integrationtests` I had to move `test-hardware.sh` out of
`tests/`, into `tests/hardware`.

One consequence of this change is that `tests/test-install` (the
temporary installation used to run the tests) isn't removed after `make
check` completes. It's already in `.gitignore`.
test_teradek_vidiu: Avoid infinite loop if crtmpserver fails to start

Wait for up to 10 seconds instead.
Merge pull request #128 from wmanley/hardware-test

Add automated test involving video capture hardware
stbt.py: Avoid deprecation warning with pygobject >= 3.12

See
https://help.gnome.org/misc/release-notes/3.12/developers.html.en#pygobject

Note that `gi.version_info` was added in 3.3.5, but our supported
distros that ship GStreamer 1 also ship a python-gi newer than 3.3.5:

* Fedora 19 ships 3.8.3 (Rawhide --the future Fedora 21-- will ship
  3.12).
* Ubuntu 12.10 ships 3.4.0 (14.04 will ship 3.12).
* Debian testing ships 3.10.

However Ubuntu 12.04, which runs our self-tests (via travis-ci) with
GStreamer 1.x from the gstreamer-developers ppa, still has an older
python-gi so we need to use `getattr` with a default value.
edit-testrun.js: Update table after "Failure reason" or "Notes" is edited

If "Failure reason" or "Notes" is changed in a test run's page using
`instaweb`, index.html has to be reloaded to see the updated values,
which is quite inconvenient.

This commit modifies edit-testrun.js to update the table with the
actual values straight away.

Note: the `truncate` implementation matches the behaviour of
`truncate` jinja2 filter in that `length` excludes the ellipsis,
i.e. `truncate(30)` actually returns a 33-character-long string.
instaweb: Expire pages sooner to get the latest content

The current `instaweb` implementation has the following issue:
1. Change the value of "Failure reason" or "Notes". The test run page
   displays the new value as it's updated by the client side script.
2. Open another test run page.
3. Open the recently updated test run page again. The old value is
   displayed because the page is loaded from the browser cache.

Expire pages in 1 second to make sure that the latest content
is displayed in every case.

We don't use `cache_timeout=0` because in flask < 0.9 that means the
same as `cache_timeout=None` -- see
https://github.com/mitsuhiko/flask/commit/4b21e2d3
edit-testrun.js: Display automatic text if manual text is deleted

If the modified "Failure reason" or "Notes" value is deleted, `instaweb`
restores the original automatic value, but the word "Empty" is
displayed in the test run's page. Get the actual value from the server's
response.

`emptytext` property of `editable` have to be redefined because its
default value is "Empty" that we wouldn't like to see.
Merge pull request #113 from szemate/stbt-batch-report-update-content

Update modified content in stbt batch reports