Discard tasks that have passed their own stop cycle.

They were being adding to task pool but in the 'held' state, which could hold up the suite by means of the runahead limit.

This applies to inserted tasks, which can be inserted with a final "stop cycle".

This also corrects a couple of missing imports in ```task_pool.py```, a bug which doesn't seem to be activated by current usage.