LogProtoFileWriter: remove explicit lseek() call

syslog-ng 3.4 reintroduced using O_APPEND when opening a destination
file so the explicit lseek() is not needed. This should be a performance
boost and also solves an interoperability problem with Linux /proc files
which do not support seeking.

Reported-By: Valentijn Sessink <valentijn@sessink.nl>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
db-parser: added .classifier.context-id for values that were correllated

This patch automatically sets ${.classifier.context-id} in messages that matched
a rule that contained a context-id attribute.

Reported-By: Fabien Wernli <bugzilla.balabit@faxm0dem.org>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
lib/template: move template related code to its own subdir
test_template_compile: Add a testcase for log_template_compile function

Main goal of this test is to help the refactoring the log_template_compile
monster function.

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