Add `doom/toggle-scratch-buffer` and `doom/toggle-project-scratch-buffer`
commands that toggle scratch buffer visibility, consistent with how
`SPC o t` toggles the terminal popup.
Also extract mode determination logic into `doom--scratch-buffer-initial-mode`
helper to ensure toggle commands respect `doom-scratch-initial-major-mode`
configuration (including mode inheritance when set to `t`).
Keybindings updated to use toggle variants:
- `SPC x` (evil) / `C-c f x` (emacs) for scratch buffer
- `SPC p x` (evil) / `C-c p x` (emacs) for project scratch buffer
Fix: #8604