scratch-buffers: Add support for type-hinted GStrings

Type-hinted GStrings will be useful for value-pairs, so add them to
the core scratch-buffer implementation.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
value-pairs: Type hinting support

This implements very basic support for type hinting template strings,
where those hints will be available to value-pairs too, allowing any
user of either LogTemplate or value-pairs to handle different types of
values than plain strings. How they handle it, is up to the callers,
this patch just lays the groundwork that makes it possible to pass
these hints around.

Furthermore, this includes support for the on-error() statement, which
tells drivers how type-casting failures shall be handled: they can
either drop the message, drop the property, or fall back to string;
and can do either of these either verbosely, logging the fact, or
silently.

This fixes #4 and #5.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
afmongodb: Add support for acting on type hints

Since we have type hints, we should use them. This patch adds support
for all the type hints known so far (except for default, which is
special), along with support for the on-error() setting.

This fixes one part of #6.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
format-json: Support acting on type hints

With this patch, $(format-json) becomes able to act on type hints, and
store ints as ints and so on and so forth. Forthermore, the on-error()
setting is implemented for format-json aswell.

Together with the afmongodb patch, this fixes #6.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>