AFSql: use the new main_loop_create_worker_thread() API

This patch adapts AFSqlDestDriver to use the new
main_loop_create_worker_thread() API that will properly terminate all
threads prior to calling the deinit() method.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
misc: remove create_worker_thread() function

It was superseeded by main_loop_create_worker_thread().

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
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>