Quality-of-life helper to allow using trailing lambda syntax for adding a cancellation listener to a Task.