Add a cancel button.

Cancellation will not happen immediately, as the running test needs to
finish before the cancel flag is read.