New Unit Testing framework

Allows for UI unit tests to be written:
- Ability to respond to expected message boxes
- Ability to fail test if unexpected message boxes occurs

This is more work towards Issue #1007. All that is left now is to replicate the message box catching mechanism for file dialogs. After that full app unit tests can be written.