Fixes#5695.
When the debugger is in single-step mode, reflects the value of option
stores at the time of the change rather than at the beginning of the
batch.
Relates to #5013.
Before starting on new functionality in the debugger, I wanted to
cleanup a bunch of bits and pieces, including:
1. Correct handling of text selection and deletion
2. Refactor of character grid at bottom of debug window
3. Deadkey realignment after text changes
4. Correct tracking of cursor position between events
5. Handling a few destruction edge cases
Refactors visual keyboard import from kmx to use Keyman Core, and at the
same time removes any UI interactions or direct Windows dependencies
from the process.