ws: Implement CockpitWebServer without threads

The main difference here is that things are no longer threaded
when serving HTTP requests.

This is necessary because we'll have some HTTP requests accessing
WebSocket channels in the future and locking everything will be
a major pain.

In addition the following fixes and benefits:

 * Don't waste a whole thread on unauthenticated requests.
 * Enforce a default 30 second timeout for reading HTTP requests.
 * Hard 4096 byte size limit for HTTP request input.
 * Don't leak so much internal state into error messages.
 * Better setup for queuing and returning responses and guaranteeing
   that they're correct.
 * Simpler to read POST input.
 * Simpler handlers.
 * No memory leak of per request signal detail (ie: the path).
 * No expensive GIO for serving files, just use mmap.
 * Use proper HTTP status codes for invalid requests
 * Fix various races and multi-threading issues due to
   main context usage.
 * Fix breaking out of the HTTP document root with double dots.

Although not implemented yet, set the ground work for:

 * Chunked Encoding
 * Correct HTTP version responses
 * Persistent connections (with multiple requests)

Fixes #551
Fixes #550
Closes #556
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
agent: Fix use after free in CockpitDBusJson

This would occur when the CockpitDBusJson was closed while
servicing some dbus calls.

Closes #564
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
common: Ignore zero byte data blocks in cockpit_pipe_write()

It doesn't make sense to write zero bytes to a stream, and
the logic in dispatch_output() isn't ready for it.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Clear input data POSTed to web server before freeing

This data may contain passwords and such.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: No threading or blocking in CockpitAuth

To do this we treat login separately from loading cookies. This was
already the case, but we make it clearer.

Actual PAM authentication happens in cockpit-session, so we simply
get notified when it completes and then complete the async login
web response.

There's room to make this cleaner, but will wait until we get GSSAPI
authentication in the mix before refactoring it further.

Closes #557
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
Cleanup the G_LOG_DOMAINS we use especially for debugging

 * cockpit-protocol: low level stuff, very busy repetetive messages
   produced by both cockpit-ws and cockpit-agent processes
 * cockpit-ws: web service higher level
 * WebSocket: the web socket code (separate from cockpit)
 * cockpit-agent: the agent specific code

You'll likely need to 'make clean' after applying this patch.

Closes #569
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
test: Remove *.pyc files when doing 'make clean'

git can confuse python, which checks the last modified date
of the pyc file.

Closes #570
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
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