logmsg: log_msg_ack() code refactored little bit

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logmsg: log_msg_cached abort type is a boolean value (and not an integer)

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logqueue: the way we determine whether a queue is empty or not is racy

at this time we just use this racy function but we have to know about it:
this is why we rename it to is_empty_racy()

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logwriter: pending_proto re-established (we need it)

A pending proto can be set to null while it is present.
[see: log_writer_reopen_deferred]

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logqueue: ack_backlog checking is moved to the superclass

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logqueue: is_empty() fixed

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logwriter: flush modes refactored

only two modes left: one for normal flush (LW_FLUSH_NORMAL)
and one for force mode (LW_FLUSH_FORCE)

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>