README: Consistent capitalization of "GStreamer"

And consistent package naming (use the Fedora names, i.e.
"gstreamer-plugins-bad" instead of "gst-plugins-bad").
README: We no longer recommend using LIRC for recording test cases

Because configuring LIRC with 2 different hardware devices (one for
receiving and one for emitting) is complicated; see
http://stb-tester.com/multi-lirc.html

Instead we recommend using "stbt record --control-recorder=stbt-control"
extra/pylint.sh: Fix error triggered by certain outputs from pylint

If pylint's output contained a "%", you'd get an "invalid format
character" error from printf.
extra/stbt_checker.py: Fix import for pylint >= 1.0

IASTNGChecker was renamed to IAstroidChecker.

See: https://bitbucket.org/logilab/pylint/diff/interfaces.py?diff2=bdcbb695e59a&at=default

Note: I haven't found any mention of it on the official site,
found it on https://github.com/rory/python-pylint-i18n/pull/1 instead.

Thanks to Máté Szendro for the patch.
Remove extra/stbt_checker.py

Because it doesn't work with pylint 1.0. Running it against the python
script created by test_that_pylint_checker_ignores_generated_image_names
gives the following output:

    $ PYTHONPATH=stb-tester/extra/ \
        pylint --errors-only --load-plugins=stbt_checker test.py
    ************* Module test
    E:  4,26: Image ".png" not found on disk (None)
    E:  5,20: Image "%s.png" not found on disk (None)
    E:  6,46: Image "idontexist.png" not found on disk (None)

    $ echo $?
    2

So the checks done in `StbtChecker._is_calculated_value` aren't working.
I haven't investigated why, but I'm removing stbt_checker.py (added
recently in 8357f6b) because it's causing `make check` to fail on
systems with pylint 1.0, until I can fix it.
Fixes to (almost) pass `make-check` with pylint 1.0

pylint 1.0 still fails on stbt.py with "TypeError: unbound method
infer() must be called with Tuple instance as first argument" due to a
known bug, fixed in the as-yet unreleased pylint 1.0.1:
https://bitbucket.org/logilab/pylint/issue/47/

Other than that, I had to fix the following pylint violations resulting
from backwards-incompatible changes in pylint 1.0:

* The "REPORTS.output-format" configuration item is deprecated in favour
  of the equivalent "msg-template" configuration (this new configuration
  was suggested in the output-format deprecation warning that pylint
  printed).

* "^L", aka vertical tab, which is treated as whitespace by python and
  is used by Emacs as a section marker, now triggers pylint's "trailing
  whitespace" error. (This is probably fixed in the currently unreleased
  pylint 1.0.1: https://bitbucket.org/logilab/pylint/issue/55/ -- but
  I've removed the ^Ls anyway; they probably confused all the non Emacs
  users).

* Long lines inside docstrings now do trigger "line too long".

* Unused names starting with an underscore now trigger "unused
  variable". This is intentional; the release notes
  (http://www.logilab.org/blogentry/163292) say: "Do not treat all
  variables starting with "_" as dummy variables, only "_" itself.

* "C1001: Old-style class defined" is a new check introduced in pylint
  1.0.
test_runner_results_server: Fix race condition

It seems that Flask (the python web micro-framework used by
`runner/server`) prints "Running on http://localhost:5787/" before it is
actually ready to accept connections. On Travis CI, a continuous
integration service that runs these tests on a VM in the cloud, even the
`sleep 1` is sometimes not long enough to allow `runner/server` to
start, and the `curl` command fails with "Failed connect to
localhost:5787; Connection refused".

Instead of increasing the sleep, which will increase the test's runtime
every time regardless of how long `runner/server` takes to start, we'll
sleep one second at a time only as long as we need to.

I didn't get rid of `expect_runner_to_say 'Running...` even though it is
no longer strictly necessary, because if the server fails to start for
any other reason, the test's error message will be more relevant.
stbt.*_motion: default parameters for motion testing are set in stbt.conf

Much like the templatematching functions, the parameters for `detect_motion`
and `wait_for_motion` can now be set in the users STBT_CONFIG_FILE (or else
are read from the system installed config file).

This gives users flexibility, particularly for the `noise_threshold`
parameter whose value should depend on the quality of the video source.
For example, an analogue source will contain more incidental noise than
HD video, and therefore a lower `noise_threshold` value should be used.
Being able to set a global parameter which is then applied to every call
to the motion detection algorithm (unless overridden) means that a custom
value does not need to be applied to every in-script call explicitly.

[Committer's note: The motivation is that we have seen several
`wait_for_motion` calls raise `MotionTimeout` when there was in fact
motion. We want to be able to change the default `noise_threshold` and
`consecutive_frames` without breaking backwards compatibility with other
users of stb-tester.]
detect_motion/wait_for_motion: reformat docstrings to use definition list

The parameter names are now subsection headings, along with their default
values. Some line wrapping was needed because of the extra indentation.

Note that the docs for `mask` were altered to match the format of
`consecutive_frames` and `noise_threshold`, although its default value is
not placed into the README dynamically because it does not come from
stbt.conf.
wait_for_motion, detect_motion: Document section of config file

...from where we read the default values for the `noise_threshold` and
`consecutive_frames` parameters. It wasn't documented that these values
belong in the `[motion]` section of the config file.
api-doc.sh: Cleanup: Consistent, unabbreviated function name

"sub" has a meaning of its own; "substitute" is consistent with the
function "substitute_python_docstring" in the same script.
stbt.wait_for_motion: Cleanup: Remove duplicate default value lookup

`wait_for_motion` only uses `noise_threshold` to pass it to
`detect_motion`; `detect_motion` already looks up `noise_threshold` in
the configuration file if the passed-in argument is `None`.
Merge branch 'motion-parameters-from-config'

* motion-parameters-from-config:
  stbt.wait_for_motion: Cleanup: Remove duplicate default value lookup
  api-doc.sh: Cleanup: Consistent, unabbreviated function name
  wait_for_motion, detect_motion: Document section of config file
  detect_motion/wait_for_motion: reformat docstrings to use definition list
  stbt.*_motion: default parameters for motion testing are set in stbt.conf
extra/runner/run: Redirect the standard input of user hooks

`run` script invokes user hooks from its `run` function that is called
from inside a `read` block; this way the user scripts share the
input of the `read` command. This can lead to unexpected behaviour
if any of the user scripts include a command that reads from the
standard input.

Redirecting the standard input of user hooks to /dev/null isolates
these scripts from `run` sufficiently.
stbt templatematch: Rewritten (for speed) to use stbt python API

...instead of calling `stbt run`. This runs in 1/13th of the time of the
old version. This is important if you use `stbt templatematch` a lot in
the self-tests for your body of stbt scripts.

While I'm here I added an extra self-test for the argument checking.
extra/runner: Summary report: Selecting a row doesn't alter browser history

Since you'd click on many rows (or use the up/down arrows), you'd end up
with many entries in the browser history, and you'd have to click "back"
hundreds of times to get to the page you were on before this summary
report.

See http://stackoverflow.com/a/8681618/606705
extra/runner: Summary report: Set iframe height on page load

This line was removed in the previous commit (baeb752c) and added to the
click/keydown handler. But we need to set the iframe's height on page
load too, for Chrome or Safari users who navigate away from the summary
report (e.g. by clicking on one of the log files) and then press the
"back" button. Otherwise after pressing "back" the iframe is at its
default height (only enough to show a few lines of text).

Firefox doesn't need this fix because it handles the "back" button
better (the currently selected row is still blue, the iframe is just as
you had left it).
extra/runner/run: Nicer error message if `ts` isn't installed

Fixes #58.
lirc integration tests for `stbt.press` with a fake lircd

lircd's request & response messages are documented here:
http://www.lirc.org/html/technical.html#applications

Some of these tests currently fail, because they expect the `stbt.press`
behaviour implemented in https://github.com/drothlis/stb-tester/pull/61
stbt.py: Check reply from lircd after sending a key press

After sending a key press to a LIRC socket, wait for the reply packet
and check whether the command was executed succesfully. Raise an
exception unless lircd reports success.

The reason for increasing the complexity of LIRC remote implementations is
that currently stbt sends a key press to lircd and doesn't care if the
command was executed successfully. This can lead to test failures due to a
key press not sent. The root cause of these kind of failures is almost
impossible to find, because it's not possible to find out if the set-top-box
ignored the received IR signal, or the IR emitter failed to send it.

Previously, sending a message to lircd was a blocking operation with
indefinite timeout. Now it has a hardcoded 3-second timeout, which
should be more than enough time given that lircd is running locally.

Reading the reply from lircd also has a hardcoded 3-second timeout,
which experimentation shows is sufficient time for lircd to emit the
infrared signal and to send the response message.

For the details of lircd messages see:
http://www.lirc.org/html/technical.html#applications