ws: Make the core cockpitwebsocket code a real object

This will allow us to do things like have it be reference counted
and so on.

Call it CockpitWebService since it's really the core of the
web service.

Closes #542
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
doc: Add documentation for reauthorization scheme

And add documentation for the "authorize" protocol control
messages.
reauthorize: Implement pam_reauthorize.so PAM module

This doesn't actually make use of it in Cockpit yet. Includes tests
and various tools to try it out.

The tests require you to do do this (usually after each build):

$ sudo make enable-pam-tests

Otherwise many of them will just be skipped.

We don't use libtool. Building a PAM module doesn't require it. Our
PAM module is (currently) linux specific, and we can build shared
modules there just fine without libtool.
ws: Track CockpitWebSocket used credentials per session

Track the credentials we used to start a session on the session object
so we can refer to them later.
agent/ws: Send and process "authorize" messages

We now handle reauthorization requests from the pam_reauthorize.so
module, and send that to cockpit-ws for reauthorization.
Revert "common: Remove cockpit_log_null_handler"

This reverts commit 177e600e1fd6c8430583fa96bcd5e348752898b1.

Turns out we need this.
agent: Implement our own dummy polkit reauthorization agent

cockpit-agent now tells polkit that we're ready to handle
reauthorization requests. Although we don't handle any prompting
in our polkit agent. We rely on pam_reauthorize.so to send us
reauthorize requests via it's back channel instead.
web: Implement a basic 'Drop extra privileges' menu option

This tells cockpit-ws not to reauthorize polkit requests any longer.
May need some tweaking in the future, and probably needs to be
timeout driven in addition to this.

Includes the concept of poisoning CockpitCreds objects, so that while
still valid objects, the actual credentials (like password) are no
longer usable.
reauthorize: A much simpler reauthorize mechanism

 * We only support a polkit-agent now and the polkit agent reauthorizes
   in its helper using reauthorize_perform().
 * The pam_reauthorize.so module is still around, but it's only use is
   to derive the secret from the login password and put in the keyring.
 * No more listening/connecting to a reauthorization agent.
 * sudo is not covered by this, but the plan is to have a separate
   PAM module which reauthorizes sudo requests against polkit. All
   requests go through polkit.

To enable privileged tests, do:

 $ make enable-root-tests

Fixes #483
agent: Fix textstream to return exit-status and exit-signal

These codes weren't being set properly due to an invalid check.
Integration tests, distcheck, for reauthorize code

This adds an 'internal' page for testing these sorts of things.
In the long term we don't have to distribute this page as one of
our default modules.