thread.c: fix thread ID format

* thread.c (DEBUG_OUT): fix format specifier for a thread ID,
  which is DWORD not pointer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
thread_pthread.c: timer thread flag

* thread_pthread.c (timer_thread): add a flag to tell timer thread
  is created, since 0 may be a valid value as pthread_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
thread.c: fix for non-scalar pthread_t

* configure.in (rb_cv_scalar_pthread_t): pthread_t is not required
  to be a scalar type.
* thread.c (fill_thread_id_string, thread_id_str): dump pthread_t
  in hexadecimal form if it is not a scalar type, assume it can be
  represented in a pointer form otherwise.  based on the patch by
  Rei Odaira at [ruby-core:62867].  [ruby-core:62857] [Bug #9884]
* thread_pthread.c (Init_native_thread, thread_start_func_1),
  (native_thread_create): set thread_id_str if needed.
* vm_core.h (rb_thread_t): add thread_id_string if needed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e