tests: Fix make check in a clean environment

Prelink all the tests that require it with the plugins they need, so
that make check correctly runs even without make install.

Reported-by: Attila Szalay <sasa@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
tests: Fix the test suite

The last cherry pick from 3.3 wasn't updated correctly, and some of the
tests ended up depending on a module that was merged into another. This
has been corrected now.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
logwriter: fixed a double-free issue in case of a flush error happens

This patch fixes a double-free and possible use-after-free issue in case
an error happens when writing a file on disk. The easiest way to reproduce
is to fill a disk, then wait time_reopen() seconds.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
syslog-format: accept RFC5424 NILVALUE in timestamps

RFC5424 states:

In section 6:
TIMESTAMP       = NILVALUE / FULL-DATE "T" FULL-TIME

In section 6.2.3
   A syslog application MUST use the NILVALUE as TIMESTAMP if the syslog
   application is incapable of obtaining system time.

This patch changes syslog-ng to conform to this requirement as it reported
a parse error instead.

Reported-By: Vincent Brillault <spam@lerya.net>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>