[bug] fix deadlock when pthread is used

When onig_free_shared_cclass_table() is called from onig_end(),
THREAD_ATOMIC_START is already called. Thus it may cause deadlock.
[new] add default multithread support

To enable this, enable the following two lines in the regint.h:
/* #define USE_MULTI_THREAD_SYSTEM */
/* #define USE_DEFAULT_MULTI_THREAD_SYSTEM */

Win32 thread is used on Windows.
pthread is used on Unix-like systems.
[dist] add --enable-multithread option in configure
[dist] update configure and config.h.in
[dist] update FAQ about multithreading
[dist] also check pthread library
[dist] update configure and config.h.in
[bug] deadlock occurs when recursive lock is not allowed
fix memory leaks

Also add NULL checks for safety.
additional fix for #24

Use xalloca() to allocate a stack.
Merge branch 'topic/multithread'