[TAV-329] Add run cancelled callback.

This allows host applications to run custom code directly after a run has been
cancelled.
[TAV-328] Add pre-run callback.

This allows host applications to run custom code before a run starts.