stbt.py: Stop sink pipeline while the source pipeline is restarting

The VidiU capture device restarts its encoder every time the video
resolution changes. It results in an EOS message sent to the source bus
that triggers restarting the source pipeline, as implemented in
6b7ba0a3.

However, if the video saving pipeline is active (--save-video option),
the tests fail with one of the following errors:
1. GStreamer raises a general stream error: "streaming task paused,
   reason not-negotiated (-4)".
2. No EOS message is sent after an encoder restart, therefore the source
   pipeline never gets restarted, and the test hangs forever or times
   out with NoVideo.

If we stop video encoding when the source pipeline sends the EOS
message, and don't restart it until the source pipeline is successfully
restarted, we can avoid the above failures.

Note that it's not enough to set the sink pipeline to STATE_PAUSED.
When we restart video recording, the video encoder raises an error
because video timestamps are getting inconsistent after a source
pipeline restart. We have to restart the encoder in order to
successfully resume video recording.

This fix has a side-effect with xvimagesink. As the entire sink pipeline
is stopped during source pipeline restart, the video output window gets
closed for this duration. However as we don't see any video during
pipeline restart anyway, only a black or blue screen, it's not a
blocking issue.

Fixes https://github.com/drothlis/stb-tester/issues/211.
stbt.py: Create a new video file each time video recording is restarted

The previous commit modified stbt.py to stop and restart the sink
pipeline every time the source pipeline is rebuilt.

Unfortunately it has an issue that filesink overwrites the video file
every time it gets restarted. A possible solution would be to use the
filesink in "append" mode, but appending the next video doesn't modify
the indexes in the video file header, and therefore the saved video
will not bee seekable.

A working, though slightly inconvenient solution is to save video to a
new file after every filesink restart. Running
    stbt run --save-video video.webm test.py
with a test that involves 2 source pipeline restarts will create
3 files: video.webm, video1.webm and video2.webm.

As during a VidiU encoder restart the source pipeline may get restarted
multiple times even though we don't receive any data, resulting in
multiple empty video files, empty video files are discarded.
stbt.py: Make decodebin handle asynchronous state changes

When the source pipeline is getting restarted, GStreamer occasionally
raises an error; decodebin complains that "The stream is of a different
type than handled by this element.: No valid frames found before end of
stream".

The solution is to set the "async-handling" parameter of decodebin to
true. As a decodebin element may also be in the user-defined source
pipeline, we have to discover all decodebins and set the parameter
dynamically.
stbt.py: Avoid race condition in restarting source pipeline

`restart_source` doesn't restart the source pipeline immediately after
it's called; it starts a 5-second timer. However, if the source bus
receives another EOS message within 5 seconds (because the video stream
momentarily restarts then stops again), it starts a new timer resulting
in two competing restart procedures.

As the first procedure deletes the source pipeline (sets it to None),
the second one raises "AttributeError: 'NoneType' object has no
attribute 'set_state'". This error is not raised in the main thread and
therefore it doesn't interrupt execution, but it's confusing to see in
the log file.