use heap-sorted queue
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.
ipython/ipython,ipython/ipython