For some error conditions, the error handler depends on
ctx->thr[idx]->dnsbase to be zeroed expicitly after allocation.
To prevent this type of error, zero all allocated memory even
though it will get written to in any case.
This should fix the segmentation fault in issue #10 but not the
underlying reason why the thread manager fails to start in the first
place.
Issue: #10
Reported by: linuxton
Yield the CPU in the main thread until the proxy thread manager is fully
started. Otherwise, the main thread could free the proxy thread manager
while the threads are still starting up, leading to a deadlock.