COW nodes in the graph are mostly connected via a relation type
that doesn't propagate the update flags. Unfortunately, due to
the scheduling implementation that means the relations don't
actually guarantee execution order for indirect dependencies.
Relations also don't guarantee order in case of cycles.

As mentioned in IRC, the simplest way to fix possible problems
is to execute all COW nodes as a separate execution stage. This
seems to fix crashes with Data Transfer modifier in a cycle.

The scheduling is really simple: during COW phase it skips actually scheduling any tasks for non-COW nodes, and then at the start of next phase it goes through all nodes again with schedule_graph and schedules everything that is now ready.

One thing about this do_work thing and handle_local_queue at the end of BLI_task_pool_work_and_wait: I wonder if there is actually a bug here, because leaving do_work on allows adding stuff to the local queue of the main thread when it's not ready to handle it; and executing any tasks outside the wait loop seems fishy. Without using the _reset function the depsgraph evaluation isn't just slower due to no suspend, it actually breaks and fails to execute some tasks occasionally in the second stage.