fixed #3868. when singleton delted, it should dispatch callbacks.
Merge pull request #5466 from andyque/bug3868

closed #3868. when singleton deleted, it should not dispatch callbacks. This PR resolves: Possible crash on repeat running between HttpClientTest, WebSocketTest, SocketIOTest.