fix potential memory leak in ThreadLocal
Summary:
See this LSan abort: https://phabricator.fb.com/P17233565.
Destructor of the object stored in `folly::ThreadLocal` itself may be using
`folly::ThreadLocal` with the same tag, with the current implementation these
objects may escape cleanup happening on thread exit.
Test Plan:
_build/opt/folly/test/thread_local_test --gtest_filter=ThreadLocalPtr.CreateOnThreadExit
Reviewed By: lucian@fb.com
Subscribers: njormrod, folly-diffs@
FB internal diff:
D1682698
Tasks:
5596043
Signature: t1:
1682698:
1416006810:
100aaa5c17cecceeea568165d552d9d7907f38d0