scanner: Clean up the UTF-16 surrogate pairs decoding

We over-assert() our pre-conditions, and the conversion is a bit
obfuscated. We should use a proper function, and de-obfuscate the
code so that the intent is clear.
build: Bump up the requirement for gtk-doc
docs: Port to MarkDown

Drop the DocBook documentation, and move everything to the MarkDown
format used by modern gtk-doc.
docs: Drop the SGML mode

The whole documentation is now MarkDown.
Use compiler annotations to determine symbol visibility

Instead of relying on a separate file that requires being update every
time we add a new public function we should use compiler annotations to
let the linker know which symbols are public and exported.

In order to achieve this we have to:

 * check for the visibility=hidden attribute
 * add -fvisibility=hidden to the linker flags
 * add a macro to annotate all public symbols

While we're at it, we should copy the versioned symbols macro layout
already used by GLib, GTK+, and other G* libraries, including the
ability to express the range of allowed versions of JSON-GLib that
third party code can compile against.
Reimplement JSON_VERSION_HEX as a macro call

Add a JSON_ENCODE_VERSION macro and use it in JSON_VERSION_HEX.
Add version constants to introspection

We need to let g-ir-scanner parse json-version.h.
Remove conditional inclusion of config.h

All the platforms and build system we support have a config.h header.