[9.16] Keep the list of scheduled events on the timer

Ondřej Surý requested to merge 3252-repair-isc_task_purgeevent-v9_16 into v9_16

Instead of searching for the events to purge, keep the list of scheduled events on the timer list and purge the events that we have scheduled.

Backport of MR !6053 (merged)

Closes #3252 (closed)

Edited by Michał Kępień

Merge request reports