amqp: ref the LogMessage before pushing it to the worker queue

If the LogMessage is not ref()d, it will be free()d up before the worker
thread pops it out of the queue, leading to severe problems. Ref it like
all other drivers do.

Reported-by: Alexandre Biancalana <biancalana@gmail.com>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
affile: fixed flush_lines/fsync option passing

Due to a refactoring issue, the argument ordering of flush_lines()
and fsync() options were mismatched with the function implementation.

The defaults remained the same, however setting flush_lines() enabled
fsync() and setting fsync set flush_lines() to 1.

This bug was introduced in 3.4.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
affile: Call log_proto_file_writer_new() properly

The order of log_proto_file_writer_new() parameters are different
between 3.3 and 3.4+, which causes confusion, and the last patch changed
the order to match 3.3. This one updates affile to pass the parameters
in the correct order.

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