cfg-grammar: Introduce template_content

The template_content type returns a LogTemplate instance, to be used by
everything that needs a template, as a single entry point.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
value-pairs: Change value_pairs_add_pair() to take a LogTemplate

Instead of taking a string and compiling the template ourselves, take a
LogTemplate instance instead.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
cfg-grammar.y: Put a few more things into cfg-grammar.h

Export last_template, last_value_pairs and last_vp_transset to the
cfg-grammar.h header, because these are used by exported rules.
Consequently, remove the redeclaration of these from modules that had it
before.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
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.

This fixes #4 and #5.

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