Added over complicated task manager to reduce server stress from
injecting lots of blocks and hopefully to prevent server crashes when
disabling the plugin.

The task manager places new tasks in a queue and pauses the queue if the
plugin is disabled. Once re-enabled the queue is resumed.