common: Add timeouts to the pipe tests

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
common: Verify that spawned process killed when terminate

We need spawned processes to be killed when we close the channel
with a problem code (ie: not cleanly).

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
common: Kill spawned processes if channel closes with problem

Make sure to kill spawned processes if the channel closes with
a problem (ie: not cleanly).

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
agent: If a channel is closed by web, pass reason to CockpitChannel

Make sure to pass closure reasons to CockpitChannel so it can
behave accordingly.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
shell: If closing a channel pass reason to the backend

This allows the front end to specify a closure reason and have
the specific backend CockpitChannel react to that reason.

Closes #929
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>