Instead of using this as a base class implementing a virtual method,
the new class IdleEvent can be used as a variable, decoupling
IdleMonitor's internal state from the derived class.
This is similar to commit 30a5dd267b6cb9ee21106d5d949de2f04781c6e7
which refactored TimeoutMonitor to TimerEvent.