Fix: Use existing QApplication event loop instead of a locally-created loop.
Fix: Improve test isolation by only keeping QApplication loaded, instead of
       also allowing base.py to persist across unit tests.
Fix: More efficient method to process pending events.