Use G_DEFINE_QUARK macro

Instead of hand-writing the error domain function ourselves.
path: Move debug dump of the path into its own function

The path parsing function is already pretty long, so we should isolate
the debugging code out of the way.
debug: Clean up debug flags accessor

Mark json_get_debug_flags() as an internal function, and drop the '_'
prefix; also, add a simple macro that we can use everywhere to mask the
function call.
tests: Improve the JsonPath suite

Run each expression as a separate unit, so we can catch errors more
quickly and easily.