Slow task execution

(WIP)

Spread out long-running tasks over multiple ticks.

This code is not yet actually used! That's why it's a WIP.