Debugger: Implement #10671.

- The stack trace view now remembers the last selected frame index for stopped
  threads when switching between them.