Move thread_available? to module
Add global thread option

The idea is from #47, thanks to @meskyanichi.
Add global_thread_option