MB-11488 Set the thread local to NULL before calling thread pool API

Memory allocations and de-allocations inside a global thread pool
API should not be accounted in a bucket memory quota because they
might not be executed in the same bucket context. As a todo task,
we need to keep track of the memory overhead of the global thread
pool separately.

Change-Id: I328dc39c98a23c2e397ccae08b0dc76936d6d2f6
Reviewed-on: http://review.couchbase.org/38942
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>