Add cancellation support to util::Task.