Adds an environment variable `PASSENGER_THREAD_LOCAL_STORAGE` to the build system for forcefully disabling the use of thread-local storage within the Phusion Passenger codebase.

Fixes issue #937.
Fix a problem with the `passenger stop` command on Ruby 1.8.7. The 'thread' library was not properly required, causing a crash.