stbt camera calibrate: Silence pylint warning

pylint 1.3.1 was complaining:

    [W0632(unbalanced-tuple-unpacking), fit_fn] Possible unbalanced
    tuple unpacking with sequence defined at line 547 of
    scipy.optimize.minpack: left side has 2 label(s), right side has 5
    value(s)

which is clearly not true, according to the scipy documentation:
http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.optimize.curve_fit.html
stbt.Region.contains: Allow passing `None` as parameter

This allows the function to take the output from `Region.intersect` or
the `region` attribute of a non-matching `TextMatchResult`.
Refactor: Use builtin `enumerate(...)` rather than `zip(range, ...)`

I added a few instances of enumerating elements in a list for iteration
with:

    for n, x in izip(range(len(l), l):
        ...

This is a much less clear than using the `enumerate` builtin and requires
importing `izip`.  I had used `izip` and `range` because I didn't know
about `enumerate` at the time.
Merge pull request #228 from wmanley/enumerate

Refactor: Use builtin `enumerate(...)` rather than `zip(range, ...)`
make check-nosetests: Ignore user's PYTHONPATH

I had PYTHONPATH pointing at a different, installed, version of stbt and
it caused nose's test-collector to fail.

We already set PYTHONPATH for `make check-pylint`. Since 68983e0 we
neither set nor clear PYTHONPATH for `tests/run-tests.sh` (aka
`make check-integrationtests`) but I'm not sure whether I should leave
that as it is, or set `PYTHONPATH=` -- so I'll leave it as it is.
stbt camera selftests: Avoid spurious error message

Each test is run in its own temporary directory so in most cases this
file doesn't exist (however some tests call `start_fake_video_src` twice
so the `rm` *is* necessary).
stbt camera selftests: Cleanup `run_validation` arguments
stbt camera: Basic documentation
Travis: Cope with ftpmirror.gnu.org being down

Sometimes builds fail because ftpmirror.gnu.org is down.  With this change
Travis will fall-back to downloading GNU parallel from main GNU FTP site
instead if the mirrors fail.  Failing that we don't bother with GNU
parallel at all and gracefully degrade to running the tests in series.
Merge pull request #231 from wmanley/parallel-failure-robustness

Travis: Cope with ftpmirror.gnu.org being down
stbt.py: uri_to_remote: Make `display` argument optional

It is only required if instantiating a test remote, whereas we want to
use `uri_to_remote` more broadly in tests so the tests exercise the
production code-paths more often.
Tests: Pull _fake_lircd into seperate function

So we can use it in a subsequent test.  We also:

* Fix a potential race condition by removing a `sleep`
* Make `_fake_lircd` generally more robust to changes in stbt's
  implementation
* Fix a potential race condition with use of `tmpname()`
* Avoid polluting `/tmp` with old no-longer-listening sockets
* Make the `test_that_lirc_remote_is_symmetric_with_lirc_remote_listen`
  test more readable.
* Use multiprocessing rather than thread for improved robustness
stbt.py: stbt.uri_to_remote(lirc): Fix defaulting parameters

Commit 1cd69253 refactored the code for generating remote control objects
into a uri parser (using the `re` module). However, due to the fact that
in regex a glob '*' can match anything including an empty string, there
was a problem in that if the (optional) lirc socket parameter were omitted
"" would be passed to `new_local_lirc_remote` rather than the expected
`None`.

With this commit I change the pattern for optional parameters from `(.*)`
to `(.+)?` to ensure that the group will not match (`None`) rather than
matching the empty string (`""`).

Thanks to Lewis Haley for reporting, diagnosing and creating a candidate
fix in drothlis/#193.
stbt.py: stbt.uri_to_remote: Fix defaulting parameters

In the spirit of the previous commit this commit tightens up the
`uri_to_remote` regexes and ensures the tests are using `uri_to_remote`,
etc. to ensure the codepaths are better trod.

Having done this I came across some bugs in `VirtualRemote` parsing code
which had gone unnoticed.  I wonder if anyone is actually still using
`VirtualRemote`.  Perhaps they should be deprecated and then considered
for removal?
Merge pull request #199 from wmanley/remote-parsing

Remote parsing
debs: Fix build-dependencies

bd356cb seems to have introduced a typo, presumably due to a rebasing
problem in the list of build dependencies in the Debian control file.
This commit fixes it.

This patch emphasises the need for automated tests for our Debian/Ubuntu
packaging. much like we already have for Fedora.
Merge pull request #234 from wmanley/fix-deb-build-deps

debs: Fix build-dependencies
make install: Build stbt-gst-plugins.so if necessary

Fixes https://github.com/drothlis/stb-tester/issues/230
Makefile: `enable_stbt_camera=no` does what you'd expect

Previously only an empty value for `enable_stbt_camera` would disable
it.
Makefile: Cleanup: `stbt-camera` isn't a build artifact