mtest: cancel stdout/stderr tasks on timeout
mtest: cancel stdout/stderr tasks on timeout

Avoid that the tasks linger and SingleTestRunner.run() never terminates.

In order to do this, we need read_decode() and read_decode_lines() to be
cancellable, and to handle the CancelledError gracefully while returning
the output they have collected so far.

For read_decode(), this means always operating on a line-by-line basis,
even if console_mode is not ConsoleUser.STDOUT.  For read_decode_lines(),
instead, we cannot return an iterator.  Rather, read_decode_lines()
returns the output directly (similar to read_decode) and communication
with the parser is mediated by an asyncio.Queue.

Signed-off-by: Paolo Bonzini <69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com>

pexip/meson,jpakkane/meson,mesonbuild/meson,pexip/meson,mesonbuild/meson,jpakkane/meson,pexip/meson,pexip/meson,pexip/meson,QuLogic/meson,jpakkane/meson,QuLogic/meson,pexip/meson,pexip/meson,jpakkane/meson,QuLogic/meson,mesonbuild/meson,jpakkane/meson,mesonbuild/meson,jpakkane/meson,QuLogic/meson,QuLogic/meson,pexip/meson,QuLogic/meson,mesonbuild/meson,QuLogic/meson,mesonbuild/meson,pexip/meson,mesonbuild/meson,jpakkane/meson,mesonbuild/meson,jpakkane/meson,mesonbuild/meson,mesonbuild/meson,pexip/meson,QuLogic/meson,QuLogic/meson,jpakkane/meson