cfg-args: split off from cfg-lexer.c

This is a preparatory patch that slices off functionality from cfg-lexer.c
to make it easier to write unit tests for.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
cfg-lexer.h: added GError based error handling boilerplate

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
cfg-lexer: added cfg_lexer_free_token() function

The role of this function is to free any type of token returned by the
lexer. Do note however that the YYSTYPE struct itself is managed
by the caller, only its contents are freed.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
cfg-lexer: implement proper escape handling in backtick insertion

This patch implements escaping when inserting a value using
backticks. When backticks are used to insert values within string
and qstrings and the value itself is a syslog-ng.conf string literal
we need to inject its value, adapting the escaped characters.

While implementing this function, I also did:
 - moved to cfg_lexer_subst_args() to a separate module
 - added GError based error handling
 - unit tests

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

Note: I removed the unit tests from the backport, due to them being
harde to backport aswell.

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