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: Raise exceptions via the generator function

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`;
- `stbt-conrol.terminal` clears the screen as part of the clean-up and
  the traceback of the exception is being wiped.

If `stbt record` throws the exception into the generator, it can
propagate to top level, and it's printed after `curses` resets the
terminal to its initial state therefore it stays visible.
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.