Change the listener to receive the task.

Currently, the listener is not told which task it is being notified
about. This changes the listener to receive the task itself. In order to
make the transition easier, it also defines an abstract class with the
same name as the previous listener, which defines a compatible
interface.

Finally, remove the CancellableTaskListener, since it is not used and
introduces a cumbersome runtime check.