test_template_compile: create get_template_function_ops()

This new function makes it easier to describe LTE_FUNC elements.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
templates.c: extract log_template_prepare_function_call()

In order to make log_template_add_func_elem() easier to read (and to prepare
a new feature there), extract log_template_prepare_function_call()
that sets up the template function invocation given the implementing
plugin.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
templates.c: extract log_template_lookup_and_setup_function_call()

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
basicfuncs: add implementation for $(template)

This function makes it possible to invoke other templates defined
in the configuration, like this:

   $(template foobar)

Assuming "foobar" is defined as a global template, this will invoke that,
and place its result as the result of the $(template) function.

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