Previous change would mean operations in-flight would not be cancelled. On cancel, check whether the operation is currently executing and if so, cancel the operation immediately.
Adds unit tests to cover cancelling an operation before it has begun. Rolls back previous test changes to logic of cancelling after the operation has started.