web: Fix container images appearing multiple times

This happens when you come back to the overview page. Regression.

Closes #364

Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
agent: Fix test-textstream tests for UTF8 handling changes

This is a regression.

Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
daemon: More reliable testing of CGroupMonitor

It's not trivial to reliably predict the amount of CPU used
between the two timestamp intervals. So skip this check for now.

Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
web: Fix test-chan.html test due to missing $cockpit

This is a regression.

Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Makes unfiltering work by toggling the class.

Fixes #341
Closes #365

Reviewed-by: Stef Walter <stefw@redhat.com>
agent: Dig out detailed docker error messages

The HTTP status of a lot of Docker failures is just "Internal Server
Error". It also has a textual failure in the HTTP body. We were just
discarding this as it wasn't JSON.

Instead we now grab text in the body of the HTTP message when we
get a failure with a Content-Type of text/plain (or no type).

Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Return to image/container overview after run

Closes #336

Signed-off-by: Stef Walter <stefw@redhat.com>
 * Whitespace fixes
web: Consistent debugging and waiting state for docker operations

Expand the functions in DockerClient for each of the level docker
REST actions. Add create(), rm(), rmi().

Add better debugging to all the operations and pages. Enable one of
these in the javascript console:

$cockpit.debugging="docker"
document.cookie="debugging=docker"

Update the waiting state consistently for all actions on images
and containers.

Closes #361
web: Replace action buttons on details page when already doing something

If already performing an action on a container, then replace the
action buttons with a throbber.

Besides being much clearer that something is happening, we're able
to prevent error conditions that would result from running multiple
incompatible actions on the same container.