stbt control: Use as control recorder with stbt record

A new listener type that integrates `stbt control` with `stbt record`.

Launching `stbt record` as `stbt record --control-recorder=stbt-control`
brings up `stbt control` to record keypresses using the PC keyboard.

The control URI is 'stbt-control:<keymap_file>' where <keymap_file> is
optional and defaults to ~/.config/stbt/control.conf.

stbt.py imports stbt-control to call its main loop, which generates
the bytecode cache 'stbt-controlc'; as stbt-control doesn't have '.py'
extension, it is not '.pyc' but gets the 'c' ending. This file is
cleaned up similarly to '.pyc' files.
stbt control: Wait between keypresses to avoid LIRC failure

If `stbt control` sends keypresses to the LIRC daemon more frequently
than one keypress in 0.2 seconds, LIRC refuses the connection and the
script exits with "Resource temporarily unavailable".

To make it possible to send repeated keypresses by pressing and holding a
button on the keyboard, sleep 0.2 seconds between sending two remote
control keys and flush the buffer of the received keyboard keys.
stbt record: Delete iterator to make exceptions visible

If `stbt record` is used with `--control-recorder=stbt-control`, and an
exception is raised from inside the loop of `stbt-record.record` before
`remote_input` generator returns, the following happens:
- The exception propagates to `remote_input` that is
  `stbt-control.main_loop` in this case;
- Python prints the traceback and raises `GeneratorExit` as part of the
  clean-up process;
- The `finally` block of `stbt-conrol.terminal` clears the screen and
  the traceback of the exception is being wiped.

If `stbt record` decreases the reference counter of `remote_input` to
zero, the exception can propagate to top level, therefore it's printed
after `curses` resets the terminal to its initial state, and the original
stack trace is kept.
stbt control: Allow mapping Escape key

In the original release of `stbt control` mapping Escape key was not
supported because of a short delay between Escape character being
received and the remote control key being sent, which makes its use
somewhat inconvenient.

Nevertheless, some users still prefer to use this key in their keymaps,
despite the mentioned inconvenience.
stbt-control: Raise custom exception if the terminal is too small

This is a follow-up to ac484dd0. That correction printed an error
message if the terminal was too small but didn't raise an exception. The
problem with that solution is that if the terminal is even too small to
print the error message then the tool quits with the unhelpful
`curses.error` exception.

Now the tool raises an exception every time the keymap doesn't fit the
terminal window, but with a helpful exception message.
stbt control: Parse command line arguments with `argparse`

`getopt` is swapped to `argparse` module in order to make the tool
consistent with other stbt tools.

As `argparse.ArgumentParser` generates the help message automatically,
the keymap file description can now be accessed with a separate command
line argument.
stbt control: Refactoring: Use curses.ascii constants

Using `curses.ascii` constants instead of `ord(...)` calls make the code
more readable and also make `SPECIAL_CHARS` dictionary more consistent.