* fix(macOS): gracefully quit app
When macOS App is closed via menu item "Quit", make sure that IPC flow completes first.
- close main window instead of directly invoking `quitApp()`
* fix(macOS): use quit-intent flag
- do not touch "minimizeToTray" setting
- instead set "quitRequested" flag to indicate quit intent
- set timeout to cancel quit request, if app fails to respond within 5 seconds
* refactor(macOS): split quit-intent state and add timeout rationale
- Separate the dual-purpose timer handle into an explicit boolean +
named timer to make the semantics obvious.
- Extract the 5s window as a named constant with a comment on why this
particular trade-off (long enough for sync/finish-day, short enough
to not block a subsequent tray-hide click after cancel).
- Fix the misleading "set flag" comment in the no-window branch
(no flag is set there; none is needed).
- Note that the `closed` reset clears the pending timer so it doesn't
keep the event loop alive.
Pure cleanup, no behavior change.
---------
Co-authored-by: Johannes Millan <johannes.millan@gmail.com>