Added testing support from within the application

Tests can access mainwindow instance directly. Results will be written
to a file.
Tests are run by running "Macro.exe t". Only then MacroTests.dll must be
present. Tests are defined in MacroTests.