(ITS#4972) thr_debug problems

Full_Name: Hallvard B Furuseth
Version: HEAD, RE23
OS:
URL:
Submission from: (NULL) (129.240.202.105)
Submitted by: hallvard
$LDAP_THREAD_DEBUG parsing is bogus, code in the inner loop should be outside
it.
Detached threads can validly exit after ldap_debug_thread_destroy() (fixed in
HEAD).
Valgrind carries the 'uninialized' state out of debug_already_initialized().
RE23/thr_debug.c has some other problems that are fixed in HEAD, but take a bit
more work to fix and test. I'll align it with HEAD if anyone is interested.