Merge pull request #2559 from libgit2/cmn/free-tls-error global: free the error message when exiting a thread