cfg-lexer: Store the preprocessed config in memory

Instead of writing the preprocessed config into a file directly, store
it in-memory first, before writing it out.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>