Code refactoring of thread suspend/resume API support
* CMakeLists.txt (enable_gcj_support): Define GC_ENABLE_SUSPEND_THREAD.
* configure.ac (enable_gcj_support): Likewise.
* doc/README.macros (GC_ENABLE_SUSPEND_THREAD): Document.
* include/gc.h (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Move to javaxfc.h.
* include/gc_pthread_redirects.h (GC_SUSPEND_THREAD_ID): New macro.
* include/javaxfc.h (GC_SUSPEND_THREAD_ID): Likewise.
* include/javaxfc.h (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Define if and only if GC_THREADS; refine
comment.
* include/javaxfc.h (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Decorate with GC_CALL; change argument type
from pthread_t to GC_SUSPEND_THREAD_ID.
* pthread_stop_world.c (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Likewise.
* pthread_stop_world.c (GC_suspend_handler): Move check for
SUSPENDED_EXT to GC_suspend_handler_inner (to avoid duplicate
GC_lookup_thread call).
* pthread_stop_world.c (suspend_self_inner, GC_TIME_LIMIT,
GC_brief_async_signal_safe_sleep, GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Do not defined unless
GC_ENABLE_SUSPEND_THREAD.
* pthread_stop_world.c (suspend_self): Remove (invoke
GC_do_blocking(suspend_self_inner) directly).
* pthread_stop_world.c (GC_brief_async_signal_safe_sleep): Decorate
with STATIC.
* pthread_stop_world.c (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Wrap code into LOCK/UNLOCK (because, at least,
GC_lookup_thread should be called with the allocation lock held).
* pthread_stop_world.c (GC_suspend_thread, GC_resume_thread): Do not
ABORT if thread is unregistered in GC (just no-op instead).
* pthread_stop_world.c (GC_is_thread_suspended): Return 0 if thread is
not registered in GC.