Backport fixes for thread local storage in rlm_python #291