Define macros to abstract away the details of thread local storage
Fix thread local storage in python Closes #291
Only call PyGILState_ensure from within threads, this should allow thread.local to function predictably for instantiation and destruction.
Add notes on threading.local