#### Brief overview of PR changes/additions
- Fixes#9670 "Mudlet stops responding on macOS part way through the
package specs": the test-only `waitForEvent()` ran a nested
`QEventLoop::exec()`, which the Cocoa dispatcher services by re-entering
`-[NSApplication run]` from inside the timer callout it is already in -
so no Qt timer, including the wait's own timeout, ever fires again.
`EventLoopPump::pumpFor()` drives `processEvents()` against a deadline
instead, which activates Qt's timers on every pass.
- Lifts the macOS pending gate the package specs have carried since they
were written: ~40 specs now run on both macOS legs, green.
- Fixes four pre-existing crashes (each reproduced on `development`
under ASan) when a profile or the application is closed from a handler
delivered during a wait: profile closes are held off while a pump runs,
application shutdowns postpone rather than cancel.
#### Motivation for adding to Mudlet
macOS was the only platform not running the package specs, and the hang
wedged real CI runs.
#### Other info (issues closed, discussion etc)
Test case: #9689's harness with this fix runs the previously hanging
suite to completion (2277/0) on both macOS runners; this PR's own legs:
2370/0 on both macOS arches, 2426/0 on Linux with ASan and leak
checking.
Assisted-by: Claude:claude-opus-5