cockpit: Fix problems with JSON generation and parsing

Fix various issues with JSON generation that are present in upstream
json-glib:

https://bugzilla.gnome.org/show_bug.cgi?id=727593
https://bugzilla.gnome.org/show_bug.cgi?id=728951

In addition clean up our JSON parsing and generation API so we don't
have to constantly carry around JsonGenerator and JsonParser objects.

Fixes #413

Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
daemon: Remove workarounds for lousy JSON encoding

json-glib had a generator bug, and we do our own generation now.
So remove the hacks necessary to work around json-glib.

Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
spawn.js is auto-generated and .dirstamp is used internally by automake.
Let's ignore both.
cockpit: Add cockpit_json_parse_object() method

And make cockpit_json_parse_bytes() return a JsonObject. It's by far
the most common situation that we're parsing and writing JsonObject
rather than individual JsonNode. So make those cases realy easy.

Related to #413