Cast thread_t's all over the place in order to be able to printf them.

A more kosher solution might be pthread_getthreadid_np() on the platforms
which support it, but I can't be bothered for three debugging printfs :-)

Submitted by:	Nils Goroll
Fixes		#932