ws: Fix race while closing in CockpitSshTransport

The exit-signal or exit-status SSH packets often race with the
close channel packets. We need to wait for them. Add a timeout
during which we wait for exit-signal or exit-status after both
the incoming and outgoing close packets have been received.

Caught by Valgrind and Travis CI