shell: Demote current pages to a legacy role

External pages in an iframe are now the modern way to do things and
the old way has been labelled as 'legacy'.

Closes #1387
Reviewed-by: Stef Walter <stefw@redhat.com>
Fix BuildRequires: sed

At some point, 'sed' stopped installing to /usr/bin/sed and started
installing to /bin/sed. The easiest thing to do is to just require
the package instead of the path.

Closes #1405
Reviewed-by: Stef Walter <stefw@redhat.com>
common: Allow telling pipe not to touch stderr

This should be used in test-server, so that people debugging can
see cockpit-bridge output on the real terminal stderr.
common: Allow telling pipe not to touch stderr

This should be used in test-server, so that people debugging can
see cockpit-bridge output on the real terminal stderr.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Ignore possibly fatal warnings when installing polkit agent

This is a workaround for a polkit bug, which emits a pretty strong
g_warning() when it can't install a polkit agent. We ignore this
warning, but also ignore the possibly fatal debugging abort()
here.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
common: Include new lines in stderr output when forwarding

When forwarding stderr output to the logs, include new lines so
that the when the messages are also relayed to stderr they look
correct.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
common: Simpler removing of signal handlers in CockpitPipeTransport

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Use 'cat' as a mock bridge in certain tests

This is simpler, faster, and makes a lot less journal and valgrind
noise.

Closes #1403
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Allow interrupting test-server for coverage purposes

For gcc gcov coverage to work the process has to exit cleanly.
So handle SIGINT in cockpit-bridge and test-server, and exit
cleanly in that case. This allows use of tools like 'git coverage'

Closes #1404
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Provide cockpit.transport.origin property

This is the same as window.location.origin, but we cannot rely
on the latter, since it is not supported by Internet Explorer,
even version 10.

Add documentation and tests.
base: Implement transport.filter() and transport.inject()

These methods allow one to filter incoming messages and inject
outgoing messages. Needed when forwarding WebSocket via another
web frame.
ws: Cleaner channel-seed suffix

channel-seed should generally be used as a prefix. So add a
separator in to the mix from the very start.
base: Expose the transport options from the "init" message

This is similar to exposing channel.options. Necessary for forwarding
WebSocket to another iframe.
base: Channels to the right host provided by the init message

The default-host is now carried by the init message. We use this
to determine the default "host" field in channels.
base: Send cockpit protocol via parent frame where possible

Instead of each frame opening up their own websocket, send
messages via the parent frame if possible.