mainloop: factor out stats timer to a separate module

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
mainloop: add calls to initiate config reload/termination
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: external threads stuff
mainloop: quit callback stuff
WIP: added a few cases to under_termination

FIXME: why are these needed?
mainloop: factor out I/O worker thread handling to a separate module
mainloop: make it possible to pass the configuration as a string

instead of a file
mainloop: factor out main thread calling functions to separate module
mainloop: add win32 signal handlers
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>