fix test ThreadPoolExecutorTest.RequestContext
fix test ThreadPoolExecutorTest.RequestContext

Summary:
The test submits a lambda which captures an object with a destructor that looks at the current request-context.

But functions can be moved. In this case, the function is moved from the task-queue. And the moved-from function must be destroyed after its guts are stolen to put in the moved-to function. Since this function is small and non-trivial, the contained object's destructor is invoked, which looks at the current request-context. But at the time that the functino is moved from the task-queue, there is no current request-context. And so accessing it fails.

It is expected that the function be destroyed with the associated request-context in scope, but in particular only the last copy of the function is subject to this rule and not previous copies such as the one in the queue.

Reviewed By: Gownta

Differential Revision: D40334050

fbshipit-source-id: 936f5224067456eb152c08d06198fe3105a30ef3

facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly