Config strings don't need to be freed explicitly
Should return NOOP if function is not available
Define macros to abstract away the details of thread local storage
Fix thread local storage in python Closes #291