doc: Document the new rest-json1 payload
cockpit: Add cockpit_pipe_get_buffer() function

This allows us to access the input buffer of a pipe even when we're
not in the 'read' event. It can change during the main loop.
cockpit: Implement a generic cockpit_pipe_connect() constructor

We'll have multiple things connecting to pipes, so implement the
connection logic in CockpitPipe.

Also make it async and connect in the main loop where possible.
cockpit: Add a cockpit_pipe_skip() function

For skipping bytes in a data buffer without returning them or doing
anything with them. Useful for channels that operate directly on
the bytes in the buffer.
websocket: Expose the web_socket_util_parse_status_line() function

We'd like to use this to parse status lines in other Cockpit code
so expose this, document it and give it a non-private name.
cockpit: Add cockpit_json_get_string() and cockpit_json_get_int()

These functions are safe wrappers for getting strings and int fields
of JSON objects. Rather than repeating this code everywhere, consolidate
it into one place.

JSON GLib is a bit tricky here because we have to check the types, and
a bit of conversion is possible (such as double -> int).
cockpit: Add cockpit_json_int_hash() and cockpit_json_int_equal()

These are for putting the gint64 type that JSON GLib uses for integers
into GHashTable.

Note these are similar to g_int_hash() and g_int_equal() in that they
take a pointer to a gint64. They are not like g_direct_hash() and
g_direct_equal() which take a pointer (and possibly an int cast to
a pointer).
cockpit: Add cockpit_json_skip() function for splitting JSON

Some services like Docker return multiple JSON blocks in their
REST JSON output. We have to split these apart before passing them
to the JSON parser.

The cockpit_json_skip() function allows this, including finding
whitespace and so on.

It does not validate the JSON blocks. It assumes that the blocks
are valid and/or will be parsed to find errors.

This is part of: Fix #265
cockpit: Verify that JsonParser trims whitespace

Our REST JSON code depends on the fact that JsonParser trims
whitespace before and after parsing. Verify this in our tests so we can
catch it if it changes.
cockpit: Add cockpit_json_equal() which checks for equality

This function checks for logical equality between two JSON nodes.
If the nodes are of different types, then the equality fails, even
if they can be converted to the same type.

Part of fix #267
WIP REST JSON

JSON REST basic implementation

More WIP

WIP until linking errors

WIP more done

WIP cleanup
WIP rest.js