logwriter: fixed an infinite loop in LogWriter

This patch fixes a possible infinite loop, when the template expansion
results in a zero-length string. In that case syslog-ng assumed
it couldn't handle the message, sets consumed to FALSE, and puts
the original message back to the head of the queue.

This is a bad idea, as the next time the LogWriter wakes up, it finds
the same message there, does the same thing again and again ad infinum.

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