Fix 100% cpu usage bug.

The timer class keeps a threading.Event object to know when it needs
to recalculate the time to next event (because the set of events to
wait for changed). We set this event when adding or removing events
to wait for, but forgot to ever clear it, so it would remain set
and the timer thread would busy-loop.