Overhauled task insertion functionality.

If a task spawns beyond its stop cycle, the new instance will be
rejected from the task pool rather than added in the held state.
If a spawned cycling task has the same ID as an existing task it
will automatically be rejected from the task pool.
Return spawned tasks (caught by purge test)
Minor tidy of previous commit.
Fix new task proxy insertion.
Merge pull request #590 from hjoliver/better-task-insertion

Better(/fixed) task insertion