agent: Call pam_acct_mgmt() when creating user session

This allows PAM to deny access for the user, so we now
respect HBAC.

Fixes #493
Closes #566
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Add per test logging in test-sshtransport.c

And turn it on for the problematic
/ssh-transport/terminate-problem test that we're trying to diagnose.

Closes #576
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
agent: Close fds before spawning agent for security reasons

Don't leak fds into the agent child process after dropping
privileges.

Fixes #506
Closes #567
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
Try again to quieten down Travis in our IRC channel

Closes #575
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
static: Serve static files from a separate directory

These are files that will remain unauthenticated and retrieved
directly from the server connected to.

These files are served in such a way that they are cached for
a year, and not refreshed. They must be renamed when they are
updated.

Closes #561
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Remove some useless rhost stuff in CockpitWebService
ws: Only share sessions if channel uses normal user/key

If a channel requests a specific user or host key, then force a
new session/agent for that channel.
ws: Test that a session without channel times out

This only happens after all channels have been closed. Refactor
things a bit to make testing easier.
ws: No need for tracking the connection in CockpitWebService

Not used for anything any longer. Removing this also fixes
a leak.
agent: Make the authorize cookie a string

This lets us use the polkit agent cookie directly, and also lets
us have a simple implementation in CockpitWebService

Fixes a crasher in the previous commit.
ws: Handle multiple WebSockets per CockpitWebService

Multiple web sockets can be served from a single CockpitWebService,
which allows tabs to share sessions, as well as coherent implementations
of /logout and resource handlers.
ws: CockpitAuth owns CockpitWebService instances

Each time a real login occurs, we instantiate a new CockpitWebService
and return that same instance when logging in with cookies.

When doing /logout we dispose that web service instance, and force
it to disconnect.

Fixes #495
Closes #565