fix racecondition when starting threads

it may happen that the g_should_terminate is still false when client threads
starts which leads to a immediate shutdown of the client threads which then
leads to hanging unix sockets, because no client thread is left to answer the
query. We therefor reset the terminate flag befor starting the main thread
instead of in the main thread.

Signed-off-by: Sven Nierlein <sven@nierlein.de>