Move nextScheduled to TaskEngine.
Invalidate tasks separately from evaluation, this allows multiple invalidation rounds before evaluation occurs.
Invalidate all scheduled tasks just before evaluation.
Merge branch 'master' into improvement/early-invalidation
Merge branch 'improvement/early-invalidation'