rewrite: Catch template syntax errors at config time

If there is a syntax error in the template part of set() or subst(),
catch it at config time, and report it appropriately.

We do this by adding an error output variable to the constructors, and
checking the constructors' return value in the grammar.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
value-pairs: Catch template syntax errors at config time

Instead of allowing syntax errors in templates to trigger at runtime,
catch them at config time by verifying the return value of
log_template_compile() and propagating the error message upwards.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
afamqp: Catch template syntax errors at config time

Teach the AMQP destination to catch template syntax errors at config
time, by adding an output error variable and a return value to
afamqp_dd_set_routing_key() and afamqp_dd_set_body(), and checking the
return value of log_template_compile(), and propagating error messages
upwards.

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