scripts: west: fix 'west debug'

We can't invoke west's main as a subprocess, or control-C from GDB in
a 'west debug' will terminate the program. Import it and run main as a
function in the same process instead.

Clean up some cruft and remove unused code while we're here, to keep
this file shorter.

Signed-off-by: Marti Bolivar <marti@foundries.io>
1 file changed