remove some unused code
rework Task interface
replace scheduler with task_scheduler
empty the cti events queue after running the task scheduler

Otherwise, if a scheduled task was calling send_cti_events, the event was
only read from the queue the next time the select loop returned, i.e.
two calls to select was needed before the event was actually sent to the
CTI client.
move self._update_safe_list out of for loop
use a deque instead of a Queue

These functions are not called anymore from the non-main thread.