Added support for cancellable tasks.
Make the tasks joinable.
TaskItem: Changes in notify() and wait().

Clear the event inside notify(), just after setting it. wait() no longer
clears events.