test: Improve check-docker

Instead of changing ownership of the socket, we properly add "admin"
to the "docker" group.

Also, we restart docker.service instead of stopping it since stopping
it somehow causes the socket to have root:root ownership afterwards.

Closes #1489
test: Use Sizzle for doing selector matching in our phantom tests

This shouldn't conflict or race with jQuery loading.

Closes #1485
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
pkg: Fix race with delayed loading of pages

Because pages load via AMD they are not necessarily ready to use when
their onload event fires. We define a convention that a page shows its
<body> element when it is ready to use, or at least when it wants to
start interacting with the user.

In the future the shell could use this to determine when to display the
page and/or show a loading spinner.

For now we just use this from tests.

Closes #1486
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
server: Remove old straggler file in this directory

Closes #1488
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
tools: Split cockpit packaging into multiple sub packages

This is already being done for the 0.30 release in Fedora, so just
bringing the spec file back into our system here.

Closes #1487
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
 * Adapt to renaming of "server" package to "server-systemd"
src, pkg: Change 'reason' code to 'problem' in protocol

This is for clarity. This code is unlike an HTTP status reason
because the 'reason' code is not present when there's no problem.
Presence of the code indicates a problem.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
pkg, src: Only forward specific control messages

In general the default is now that all control messages are single
hop and not forwardable. Only "open" and "close" messages are
forwarded.

Also change the cockpit.filter() callback interaction to better
handle this case.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Use "init" message to indicate lack of authentication

This fits with the general model of things better. The "init" message
must come first, and if it indicates an error, then there's no going
anywhere.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Control "close" messages are never broadcast

This wasn't implemented nearly anywhere and just made things more
complicated than they need to be. Now "close" messages always have
a channel.

Closes #1492
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
test: We need glibc-static installed to run the tests

Closes #1494
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
test: Run TestDashboard.testBasic as "admin"

This just works.

Closes #1496
Reviewed-by: Stef Walter <stefw@redhat.com>
common: Pass payload to CockpitTransport "control" signal handlers

That way they don't have to reserialize if they want to forward
a message.
common: Add cockpit_pipe_transport_get_pipe() function
ws: The "logout" message is forwarded

We forward the logout message from the web service to the various
session bridges.
bridge: Implement "superuser" channel option

When this is set to true we use pkexec to launch another cockpit-bridge
as root, and run the channel via that bridge.

Closes #1493