WIP COMMIT: Implement TaskManager class and refactor dispersy to use
it. Still missing a periodic cleanup task to GC the pending task list.