syslog-ng-ctl: move into a separate subdirectory

Instead of sharing a home with the main syslog-ng binary, use a separate,
dedicated folder.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
control: refactor to make place for a win32 implementation

Signed-off-by: Juhasz Viktor <jviktor@balabit.hu>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
control: add win32 implementation for control channel

Signed-off-by: Viktor Juhasz <jviktor@balabit.hu>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
service-management: new module to encapsulate systemd communication

Some communication takes place between syslog-ng and systemd after
the former has started. We indicate when initialization at startup
finished and also some textual messages to indicate our state.

Earlier it was right in the middle of the mainloop code, now factor it
out to a separate module, perhaps this interface can be useful
for other similar implementations.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
mainloop: move signal setup code to setup_signals()

Some of the signal setup code was in main_loop_run(), move that to
setup_signals() as that function is meant to set up signals.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
mainloop: factor out main_loop_io_worker_init()

Factor out initialization function for I/O workers.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
main: move app_startup() to the main function

Instead of invoking it in main_loop_init().

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
mainloop: factor out stats_timer_init()

Instead of open coding it in main_loop_run(), use a separate function.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
foo: bar
runid: new module to maintain run_id
mainloop: external threads stuff
mainloop: quit callback stuff
mainloop: customizable startup/shutdown/reload messages
foo: bar
mainloop: factor out stats timer to a separate module

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
mainloop: factor out I/O worker thread handling to a separate module