logthrdestdrv: make the thread ivykis based.

It is easier to add timer, task, event etc. to the threaded destination,
and this re-factorizing eliminates the locking and waiting for conditions.
And the throttle timeout handling is also added to logthreaded destination.

Make this code is more maintainable.

Signed-off-by: Juhász Viktor <viktor.juhasz@balabit.com>
afsocket: Memory leak fix

If the configuration stays the same during a reload, log_reader_set_peer_addr()
is already called and log_reader_set_peer_addr() doesn't unref its previous
peer_addr.

Signed-off-by: Tibor Benke <ihrwein@gmail.com>
Merge pull request #160 from juhaszviktor/logthrdestrefact

logthrdestdrv: make the thread ivykis based.
Merge pull request #166 from ihrwein/f/afsocket-memory-leak-fix

afsocket: Memory leak fix
logwriter: still free the unconsumed item during reloading configuration

Otherwise we have no chance to free this stuff.

Reported-by: Xufeng Zhang <xufeng.zhang@windriver.com>
Signed-off-by: Tusa Viktor <tusavik@gmail.com>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
socket: Various leak fixes in afsocket module.

TransportMapper and SocketOptions structures are not embedded ones, so
they should be freed up, when freeing up drivers.

Reported-by: Xufeng Zhang <xufeng.zhang@windriver.com>
Signed-off-by: Viktor Tusa <tusavik@gmail.com>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>