Clean up thread local storage -- no need to handle PT_TLS in the loader; use __declspec(thread) since it works nowadays, other cleanups