tests: Fix minor memory leaks in general test suite
core: Add support for JSON to GDataParsable, GDataEntry and GDataFeed

This also includes initial code for detection of the Content-Type of received
messages, and parsing JSON or XML depending on that.

This breaks ABI (but not API), and adds a dependency on json-glib ≥ 0.15.

Complete unit tests are included. Further work is expected for integrating
JSON support into GDataService, ready for use with the Tasks service.

This work is originally by Pēteris Krišjānis <pecisk@gmail.com>, with
additions by Philip Withnall <philip@tecnocode.co.uk>.

Helps: https://bugzilla.gnome.org/show_bug.cgi?id=657539