use heap-sorted queue

avoids having to sort the queue when updating the graph

also renamed `depending` to `queue_map`, to better describe its role.
add debug log when a task is added to the queue
use per-timeout callback, rather than audit for timeouts
use deque instead of heapq