Added unit tests for cancellation-waiting workflow in installer dialog.

Also fixed Esc to not cancel the dialog if we're waiting for cancellation.

@peterflynn -- assigning to you; @dangoor reviewed the original unit tests but since these are specifically related to the new workflow you added I think it makes sense for you to take a look. Feel free to hand off if you're overloaded.