Tear down of daemons is flawed.

When one of the servers is teared down in most daemons the thread
spawned for handling the bnet_thread_server or the main thread
never closes all sockets and releases the workq as most of the time
the thread is just shot inflight and as a side effect things get
cleaned up. When the process exits resources are released but its
not very clean.

Fixes #53: Tear down of daemons is flawed.