Do not leak EventHandlerBase handlers and factories on shutdown
Do not leak EventHandlerBase handlers and factories on shutdown

Summary: `EventHandlerBase` uses leaky singletons to store handlers and factories, but since these are user-provided they may not be safe to leak: for example, as soon as one holds any data structure that uses pointer tagging, LSAN is not able to follow the pointer and will report a false positive (a notable case is `folly::atomic_shared_ptr`).

Reviewed By: roddym

Differential Revision: D40259693

fbshipit-source-id: c7afcbb514b8060a26c4d249bfadc9435868a4ac

facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift