Remove thread capture

This request:
- removes the captureThread logic from the EventProcessor
- removes Dialog's waitForWindow property
- removes the Dialog method of FileChooser
- modifies MessageBox.confirm to use a callback