refactor(core): consolidate cmd resident into core background renderer
Moves cmd registry + shortcut wiring from a standalone cmd-resident
BrowserWindow created by cmd-glue.ts into the core background
renderer app/index.js. cmd/background.js now exports initCmd/uninitCmd
that app/index.js awaits at the top of init; app/cmd/index.html and
backend/electron/cmd-glue.ts are deleted.
Fixes a race where registerExtensionCommands never ran: the
ext:all-loaded subscriber was registered at the end of core init, but
the topicCorePrefs publish near the start triggers main's
loadExtensions which fires ext:all-loaded in parallel. Any publish
that landed before the subscribe was silently dropped, so
quit/restart/settings/theme-* etc. were never registered. Moved the
ext:all-loaded subscribe to immediately after initCmd, before the
first publish that could kick off extension loading.
Also updates the core-glue console-message forwarder for Electron 40,
where the event level field is a string literal instead of an integer
— the previous numeric filter dropped all renderer output.
Registry grows from 72 to 96 commands. core.spec.ts 7/7 passes
including the previously-failing 'quit and restart commands are
registered'.