This allows the user to hit escape while the control key is
still pressed to cancel the switch (e.g. if they realise there
isn't a preset they actually want), rahter than having to go
back to the original entry, or select one they didn't want
and then switch again.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18423
Calling wxDialog::EndModal() directly from inside the dialog is a
potential bug if the dialog is shown in the modeless or window modal
(quasi-modal). Use the internal button events where possible and
check for the appropriate mode before calling the correct end dialog
function.
The dialog isn't actually movable with the mouse, so all the placement
logic inside DIALOG_SHIM is extraneous and actually causes the switcher
to appear on the wrong monitor if pcbnew was moved across monitors after
it was opened.
Fixes https://gitlab.com/kicad/code/kicad/issues/5789