Assign the freelist pointer to the front of the list. When it's time to wrap, the next ID given out will be 0. We restarted the free search at min. We need to truncate this to for backwards compatibility. Checks if queue is empty.
Returns earliest time in a non-empty queue.
Insert into its new location in the heap. Update the corresponding slot in the parallel array. Only try to reheapify if we're not deleting the last entry. Restore the heap property after a deletion. We've found our location in the heap.