affile: Restore fsync & flush-lines functionality

Back in May, in 101cb379, which moved fsync() from logtransport to
logproto, a new argument for log_proto_file_writer_new() was
introduced, but when updating the call sites, the flush_lines and
fsync arguments were mixed up.

This corrects that, restoring both flush-lines() and fsync()
functionality for the file destination.

Reported-by: Evan Rempel <erempel@uvic.ca>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
logrewrite: fix rewrite set/subst related segfault

If a set/rewrite operation is referenced from multiple locations, and
it uses template functions, a segfault has occurred, as the clone
operation didn't properly propagate the associated configuration object,
which rendered template->cfg to be NULL, which in turn caused
template-function lookup code to dereference a NULL pointer.

This was fixed by two dependent changes:
  - always passing the already-compiled LogTemplate to the rewrite
    operations instead of a string constant.
  - reusing the compiled template object in clone()

Since LogTemplate is reused, and the first one contains a proper reference
to the appropriate configuration object, the NULL deref issue was
solved too.

Reported-By: Johnson, Chris <chris.johnson3@hp.com>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
logrewrite: Fix the template reference counting

In case of the subst() and set() rewrite statements, when the
implementation was changed to pass a template to the constructor
instead of a string, the free() remained in the parser. While that was
supposed to free a string allocated by the parser, after the change,
that free'd the template that we had stored in the rewrite struct
itself.

To correct the issue, both the subst() and set() constructors will ref
the template, and the parser-side will unref it, instead of free()ing
it up.

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

NEWS & VERSION updated for 3.4.1.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Initial version of rss destination
Beautifications to the RSS module.

Deleted unneded debug messages, some function extraction, reindent, and
description fixup.
Added rss destination for syslog-ng compilation
Minor fix for HTTP header is response.
Fixed compilation errors and warnings.
rss: Added feed title, entry title and entry description options.

Feed title can be specified as fixed string,
entry title and entry description can be specified as a template.
Fixed messagegen sendMessages counter.

sendMessages repeat parameter now means the number of messages to send,
eg repeat=1 means to send exactly one message.
Added simple testcase for rss destination.