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>
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>
func-test: create a separate target for slow functional tests

With this patch "make check" will only run unit tests (still contains a
number of not fast-enough programs, but they are still faster
than func-test).

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
rewrite: move to a subdirectory of lib/

This patch moves the rewrite functionality under a new subdirectory
to make the source code easier to navigate.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
parser: move to a subdirectory of lib

This patch moves the rewrite functionality under a new subdirectory
to make the source code easier to navigate.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
filter: move to a subdirectory of lib

This patch moves the filter functionality under a new subdirectory
to make the source code easier to navigate.

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