bridge: Implement an echo channel payload

And a test that uses it. This will become useful for checking of
behavior of binary channels independent of the channel implementation.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Support for binary and base64 encoding in channels

This is mostly underlying work, and not yet exposed in cockpit.js
By passing "binary": "raw" in a channel raw data will be sent, this
is used by the resource1 channel for now.

By passing "binary": "base64" in a channel, all received data will
be assumed to be base64 encoded, and sent data will be encoded on
the way out.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Rename 'text-stream' payload to 'stream'

Depending on whether the channel is binary or not, the stream can handle
binary data. Not just text.

Closes #1427
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Exit cockpit-ws after timeout if started via systemd

Exit cockpit-ws after a 10 minute timeout if started via systemd
and nobody has connected or is still connected.

Closes #1431
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
 * Fixed typo in documentation.
 * Removed debug output.
server: Terminal is a basic server feature and not aliased

The terminal is a basic server feature and not aliased. It was a
nice proof of concept for an alias, but now lets get it right.

Closes #1462
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Remove unused cockpit_web_service_packages() functions

These are no longer used. Cleanup and remove the code.

Closes #1463
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Use the shell to determine default host if loaded into shell

When cockpit.js code is loaded into the shell, use the shell to determine
the default host rather than requiring it to be passed in all over the
place.

This lets us write future proof code. Later on when everything is migrated
we can remove this hack.

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