Declare that main thread cannot block whilst gtk-gnutella is running.
atomic_release() is now explicit instead of relying on _sync_lock_release().

The _sync_lock_release() is obscurely documented in the manual page and we
need to make sure that a lock release is indeed properly resetting the lock
byte, then issuing a memory barrier.
thread_lock_deadlock(): fixed error message when lock owned by another thread.

It is necessary to copy over the message since the thread_element_name()
routine uses a static buffer to perform its computation.
thread_element_name(): use a thread-specific static buffer to avoid problems.
thread_launch(): on Windows, need to configure the thread stack size.

Since the stack currently cannot be allocated properly, we need to tell the
Windows runtime about the user-defined stack length.
cq_global_init(): call tm_now_exact() to cut auto-init dependencies.

Also declare the name of the callout queue thread explicitly.
Added the SPINLOCK_OWNER_DEBUG compile option.
once_flag_run(): enhanced logging when recursively initing routine.

Also the first recursion is simply flagged but is ignored otherwise ignored,
i.e. the second initialization attempt is ignored and the routine is marked
as being initialized already.

A second recursion is still fatal however.
Improved lock traces by passing the source location of the locking call.

Made sure spinlock_loop() is exited immediately if pass-through was activated
whilst we were already in the loop.
Added raw spinlocks, which do not call spinlock_loop().
Use raw spinlocks in low-level thread management code.

We do not want to enter spinlock_loop() if there is contention on these
low-level locks, whose locking span is small and for which we must avoid
the risk of re-entering the thread layer via access to the current thread
element.
Added support for "generation time stamps" to protect against clock adjustments.
Improve logging during stack overflows on Windows.
Forgot to include "glib-missing.h" in lib/thread.h for g_strlcpy().
xmalloc_thread_free_deferred(): use thread_id_name() to log symbolic name.
xmalloc_thread_free_deferred(): also log total size of blocks freed.
Don't abuse s_minierror(), also use s_error() and regular logging routines.
Make sure callout queue events are dispatched with the queue unlocked.
When system time jumps are detected, wakeup all condition variables.

Also added cond_vars_count() to return the amount of currently used
condition variables, since we now have to list them all.
Added "tm_debug" property to activate debugging of the time management layer.