Remove locals when DebugSession ended rather than stopped. When debugee segfaults the session is stopped - but not yet ended; the user still can examine variables. Fixes crash when variables view is visible.
Added test for this in gdb.
BUG: 219083
(the backtrace is a bit different, but the cause for the crash is the same)