Remove __thread__ method

It's not used anywhere.
Fix race condition in thread pool.

This was failing in JRuby, causing Travis to complain.