fix(download): register will-download handler on webview guest session
Popup windows spawned by target="_blank" download links were not cleaned
up after the download started. The existing popup-closing logic in
registerDownloadHandler was correct, but the handler was only wired up
on profileSession, and will-download fires on the session that owns the
webContents emitting the download. A <webview> inside a canvas page
gets its session from its partition attribute, which page.js sets
asynchronously. The guest webContents can end up on a different Session
instance than the host BrowserWindow, so the profileSession listener
never fires for the popup's download.
Fix: export registerDownloadHandler from session-partition.ts with
idempotent WeakSet-based tracking, and call it from the canvas page's
and popup's did-attach-webview handler on guestWebContents.session.
This ensures the download handler (and its popup-cleanup branch) runs
regardless of which session the webview ended up attached to.
Test: tests/desktop/download.spec.ts:151 target=_blank download cleans
up the popup window — was consistently failing at 37 vs 36 windows, now
passes in both isolation and the full suite.