Avoid copying of intree in get_successors
Avoid copying intree
Use assert
Use sensible method to determine successor
canonical_snapshot: avoid some multiple loops
Avoid unnecesseary copying
No unnecessary sorting
Modernized get_next_tasks signature