stbt.black_screen: Minor change to docstring
Rename stbt.black_screen to stbt.is_screen_black

As pointed out by Will Manley, "black_screen" is a noun so it can be
confusing when used like this:

    black = stbt.black_screen(frame)
    [...]
    if black: ...

That is, you don't always use it directly in an `if` statement
(`if black_screen(frame): ...`); so the `is_` clarifies that this is a
predicate function. This is a policy we should adopt for all predicate
functions (of which we don't currently have any other than this
`is_screen_black` function; our functions like `wait_for_match` are
actions rather than predicates).

Aiman had originally called this `is_black_screen` but in code review I
asked him to call it `black_screen`. Sorry!

Note that renaming this function doesn't break backwards compatibility
with user scripts because the function hasn't been in any official
release of stb-tester.
api-doc.sh: Remove unused substitution

The special handling of `**kwargs` (to avoid warnings from rst2man) was
added in dd44303b4 but isn't necessary since 25d7f3a97.
stbt-completion: Fix completion for `stbt templatematch`

The tab-completion script was trying to read the possible `match_method`
and `confirm_method` values from the `stbt-templatematch` GStreamer
element, which hasn't existed since 0f0dc1a6, 7 months ago.

I suppose I *could* somehow parse these from `man stbt`, but it doesn't
seem worth the effort. I'll just enter them literally; changing those
values would break user scripts, so they are unlikely to change.
Move extra/runner files to stbt-batch.d, without modification

Modifications will follow in subsequent commits, to keep the diffs
easier to follow.
Change "runner" references to "stbt batch"
Rename configuration section from `[runner]` to `[batch]`
Rename stbt batch server => stbt batch instaweb
Install the runner as "stbt batch"
stbt-completion: Tab-completion for `stbt batch`

* `stbt batch <TAB>` completes subcommand names (run, report, instaweb).

* `stbt batch run <TAB>` completes filenames (test scripts). It doesn't
  complete flags like `-1` or `-k`, nor arguments to the test script,
  nor separating test scripts with `--`.

* `stbt batch report <TAB>` completes directory names (it doesn't
  validate that the directory name is in the format generated by
  `stbt batch run`, because you don't know if it's just an intermediate
  directory on the path to the final test-run directory).

* `stbt batch instaweb <TAB>` offers "--help", "localhost:5000", and
  "0.0.0.0:5000". The latter two are just to give the user a hint; I
  don't know how to figure out a list of network interfaces, and
  offering all possible ports is pointless because you'll still have
  to type in all the numbers (there's no unambiguous port number to
  complete to).
test_stbt_batch_run_killtree: Fix when only running "test-stbt-batch.sh" test suite

You can run `tests/run-tests.sh` like this:

* `tests/run-tests.sh`: Will source all `tests/test-*.sh` files and run
  all the test cases therein.
* `tests/run-tests.sh test_stbt_batch_run_killtree`: Will source all
  `tests/test-*.sh` files and will run only the specified test case.
* `tests/run-tests.sh test-stbt-batch.sh`: Will source only the
  specified file, and will run all the test cases therein.

In that last case, `test_stbt_batch_run_killtree` was failing, because
`test_killtree` wasn't defined.
stbt, stbt-batch: exec, instead of fork, the subcommand

...such as `stbt-run` or `stbt-batch.d/report`.

The change to `stbt-batch` fixes the tests
`test_stbt_batch_run_sigint_{once,twice}`.

It doesn't make any difference when running `stbt batch run`
interactively and pressing Control-C. That always worked, presumably
because the shell sends the sigint signal to all foreground processes in
the process group.

The change to `stbt.in` (which becomes the installed `stbt` script)
isn't strictly necessary, but I don't think it will hurt. Less
intermediate processes in the PID tree can only be a good thing.
Merge branch 'install-the-runner'

Installs extra/runner scripts as `stbt batch`.

* install-the-runner:
  stbt, stbt-batch: exec, instead of fork, the subcommand
  test_stbt_batch_run_killtree: Fix when only running "test-stbt-batch.sh" test suite
  stbt-completion: Tab-completion for `stbt batch`
  Install the runner as "stbt batch"
  Rename stbt batch server => stbt batch instaweb
  Rename configuration section from `[runner]` to `[batch]`
  Change "runner" references to "stbt batch"
  Move extra/runner files to stbt-batch.d, without modification
README, RPM specfile: stb-tester requires python 2.7

Since 0.12 almost a year ago (specifically, commit 45263fa2) we require
python 2.7 (multiple context expressions in a single `with` statement is
new in 2.7). Since we don't test on 2.6, I don't know how many other
things we do aren't compatible with python 2.6, so at least we should
be honest about it.
stbt.precondition: Context manager that replaces UITestFailures with UITestErrors

See the docstring of stbt.precondition for details. This approach has
proved very useful when running a single test script hundreds or
thousands of times to reproduce a particular intermittent defect. It
allows `stbt batch run` to automatically colour uninteresting† defects
in yellow (instead of red) so that we can focus our manual investigation
on the interesting failures.

† Uninteresting for the purposes of the current investigation into a
  particular defect.
make doc: Fix stbt.precondition documentation

stbt.precondition's `@contextmanager` decorator screws up the function
signature seen by pydoc, so use some sed to put it back to normal.
stbt.precondition: Document style of `message` parameter

`precondition`'s `message` parameter should describe the precondition,
not the error when the precondition isn't met.

I also tweaked the `PreconditionError` exception's message to make this
obvious in the test-run's output logs.
Rename stbt.precondition to stbt.as_precondition

Because the following code:

    with precondition("Tuned to channel 80"):
        some_code()

...could be interpreted to mean: run `some_code()` only if the
precondition holds, or only after establishing the precondition.

What it really means is: Run `some_code()` but if it fails treat it as a
precondition error, not a test failure. This is somewhat clearer with
the new naming:

    with as_precondition("Tuned to channel 80"):
        some_code()

Note that this change doesn't break compatibility with user scripts,
because `precondition` hasn't been in any stb-tester release yet.
Merge branch 'precondition'

* precondition:
  Rename stbt.precondition to stbt.as_precondition
  stbt.precondition: Document style of `message` parameter
  make doc: Fix stbt.precondition documentation
  stbt.precondition: Context manager that replaces UITestFailures with UITestErrors