web: adds spacing between accounts

Fixes #671
Closes #713
Reviewed-by: Stef Walter <stefw@redhat.com>
daemon: Fixed formatting string

Limit the length of the sscanf field to prevent being attacked.

".*" conversion rule is not available in scanf/sscanf/fscanf series functions,
the only way to do this is using explicit number to limit the length of the field.

Fixes #665
Closes #706
Reviewed-by: Stef Walter <stefw@redhat.com>
web: Don't move the controls if login fails

Fixes #672
Closes #707
Reviewed-by: Stef Walter <stefw@redhat.com>
web: fixes dropdown menu size and adds caret

Fixes #680
Closes #714
Reviewed-by: Stef Walter <stefw@redhat.com>
web: Removes unneeded and unused variable

Reviewed-by: Stef Walter <stefw@redhat.com>
web: Changed indentation to match overall style

Reviewed-by: Stef Walter <stefw@redhat.com>
web: makes selecting accounts more intiutive

Highlights the account being hovered over and changes the cursor to a
pointer

Fixes #711
Reviewed-by: Stef Walter <stefw@redhat.com>
daemon: Try and fix race unreferencing object in machines tests

Closes #678
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Better debug logging when removing a channel from session
agent: Split out MockTransport into its own file

And move some tests to start using it.
common: Add cockpit_assert_bytes_eq() and cockpit_assert_data_eq()

These functions are used in tests to check if memory matches expected
and gives informative output if it doesn't match. This output could
be further enhanced to show a diff or some such, but for now it's just
a simple escaped listing.
agent: Add cockpit_channel_close_obj_option() function

This allows adding full JSON objects to channel close messages.
agent: Implement agent support for modules and resource1 payload

This adds support to cockpit-agent for listing and loading module
resources.

See doc/modules.md for information about how modules are laid
out on the system.

doc/protocol.md contains information about the resource1 payload
ws: Add cockpit_web_response_abort() to stop streaming response

When we are streaming a web response, and half-way an error occurs
and we cannot get the remaining data to stream, we need to terminate
the web response.

cockpit_web_response_abort() does this by just disconnecting the
web response. The caller should be able to tell whether the data
is incomplete based on length header or chunking.
ws: cockpit_web_response_get_state() and expose web response state

Allow others to see what state a web response is currently in.
This helps prevent callers from having to carry around the identical
state.
ws: Strip query string when handing HTTP requests

We never use a query string, and some callers like jQuery add one
automatically in certain cases.
ws: Change how CockpitWebServer handle-resource signal detail works

To match subtrees, connect using detail handle-resource::/component/, to
match actual to level paths use detail handle-resource::/component
agent: Retain the correct SIGTERM exit code when terminated

When the agent is terminated, and we exit cleanly, re-raise the
same signal so that the caller will know we tere terminated.
common: Broken Pipe is not a critical error for CockpitPipe

This can happen for a number of reasons, such as an agent being
terminated. We want to handle the real problem and not freak out
about the failed write() in this case.
common: If 'internal-error' try to get better error from exit status

If our CockpitPipe fails with 'internal-error' and it's a process,
try to get a better error by looking at the exit status of the process.
Hopefully that will be more descriptive.