Allow a timer with pending callbacks to be destroyed
Summary:
This diff is part of a string of changes that is getting `HHWheelTimer` to use standard smart pointers.
D2617966 is being reverted. The `DestructorGuard` that was added for safety is not possible without intrusive reference counting.
That means that the `count_` (of pending callbacks) will still be correct, but there will be nothing to check it against. Because of that, I removed the assertions to make sure that the count of pending callbacks matches the count of active guards. Anyway, there were already ways to defeat that test, such as by creating a `DestructorGuard` from any client code.
As long as the assertions are gone, the `cancelAll` can be moved to the destructor. It only ever got run when `destroy` was called and `count_` was `0`, which means that `~HHWheelTimer` was also going to get called at the same time.
Reviewed By: djwatson
Differential Revision:
D3349303
fbshipit-source-id:
433fa6605ee9921833328e2f82bd07b2e17e42c5