Use normal event loop in GUI test program.

Don't create an event loop manually, let the port-specific code do it and run
it as usual in the GUI unit tests.

This has several advantages:
 - No need to manage the event loop manually in the test.
 - No need for Mac-specific code in the test itself.
 - Code being tested runs in the same context as in a normal GUI program,
   which is especially important for event-loop related tests under wxOSX as
   the main event loop is special there.
Add wxEventLoop::ScheduleExit().

This method allows to request exiting from the given event loop even if it's
not the currently active one, unlike Exit() which would assert in this case.
With it, it becomes possible to ask the loop to terminate as soon as possible
even if a nested loop is currently running.

See #10258.