cfg-lexer-subst: change invoke to accept a const pointer as input

Instead of changing the characters in-place in the buffer to terminate
strings, copy them to a temporary buffer so we can accept a const pointer.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
cfg-lexer: don't take ownership of the buffer argument in cfg_lexer_include_buffer()

cfg_lexer_include_buffer() assumed ownership of the input buffer, e.g.
it took care of freeing it. This was a bit unintuitive and cumbersome to
use and this code wasn't performance critical anyway.

This patch changes the function to only get a borrowed reference and the
responsibility of freeing the buffer stays at the caller.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
cfg-lexer: add backtick substitition to cfg_lexer_include_buffer

This patch enables backtick substitution in cfg_lexer_include_buffer()
calls, just as it is performed in cfg_lexer_include_file().

Another function, named
cfg_lexer_include_buffer_without_backtick_substitution() is also added,
which performs the previous function and is used when including block
generator results.

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