.error(...) continuation support

User can specify a .error(…) function that gets called only if
.cancel() is called on a parent task.
This is useful to implement a Promise like functionality using
event_task, so that it can be “fullfilled” by calling set or “rejected”
by calling .cancel()