Let EventBase::runInEventBaseThreadAndWait consume its argument
Summary:
[Folly] Let `EventBase::runInEventBaseThreadAndWait` consume its argument.
Likewise `EventBase::runImmediatelyOrRunInEventBaseThreadAndWait`.
And enforce that the function is destructed before returning, so that, in the case of a wrapped lambda, all captured objects' destructors run before returning from the function.
Reviewed By: elsteveogrande
Differential Revision:
D5994106
fbshipit-source-id:
816c9431a85a3d41e4fda321065614f4c18f0697