Do not hold lock while calling other code from cancel token.
Cancel callbacks can be removed now.

+review REVIEW-5088
Daemon cancels the build without the lock being held.

+review REVIEW-5088