shell: Track navigation in external pages

And add some toy navigation to the playground.

Closes #1406
Reviewed-by: Stef Walter <stefw@redhat.com>
base, shell: jQuery promises can be used recursively and with targets

jQuery promises can be used recursively, and with targets, so it's
important to carefully craft extending promises with additional methods.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
doc: Refer to them as jQuery promises and not deferreds

This is the correct name for the interface

Closes #1448
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
tools: Use a consistent mock build directory mock/

Previously we would create a new mock/ directory wherever the current
directory was when the make-rpms tool was run.

Closes #1449
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws, bridge: Add some debug output to launch of processes

Some more debugging output when launching dbus-daemon or cockpit-session

Closes #1450
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
test: Fix check-terminal race in integration test

Closes #1453
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Fix problem using batch after free in CockpitDbusCache

Related to assertion related on #1444

Closes #1454
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Return a full CockpitTransport from completed authentication

Instead of just a pipe. This allows us to substitute in other
transports than pipe based ones.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Add ignore-key property on CockpitSSHTransport

This is to be used when we are sure we can ignore the host key. Such as
when connecting to 127.0.0.1

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Add a "result" signal to CockpitSshTransport

This signal is emitted when the connection finishes, whether success
or failure. In the success case it means that cockpit protocol messages
will start being relayed to the other end. In the failure case it
means that the transport will close shortly.

But this is meant to have a bound over the connection aspect of an
SSH transport, that can be relied on to emit when done.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Refator CockpitAuth to put cockpit-session stuff together

This will make it easier to clearly see what's what once the other
SSH loopback based authentication is in place.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Use an alternate loopback SSH based login when running in container

When running in a privileged container systemd and selinux are both
very very confused if we try to run a user session from a descendant
of a daemon like docker.

So for login and starting the user session, we instead SSH into
127.0.0.1 and use that for authentication too.

Note that because we are connecting to 127.0.0.1 we can ignore host
keys.

Closes #1444
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Remove incorrect unthread-safe deprecated test

This was already broken, running channels in a thread is not
something we can do. The way that idle handlers, for example
are added to the wrong GMainContext is just the beginning of
issues here.

This code is deprecated so just remove the test.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Simpler handling of closing channels during open

When opening a new channel, we need to wait until after the
mainloop has run before emitting signals, so that signal handlers
can be connected.

Previously each channel would do this in its own way. This puts
that in the base class so it's consistent.

Closes #1421
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
shell: Also remember last options when switching hosts

Closes #1452
Reviewed-by: Stef Walter <stefw@redhat.com>
daemon: Add some more debugging of the daemon startup

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
Closes #1456
daemon: Don't hang if AccountsService cannot be reached

And also don't export the accounts object when AccountsService
is not available.

Closes #1457
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
shell: Export hosts model and make it more useful.
shell: Keep hosts sorted in the switcher.
shell: Reconnection dialog for hosts.