Adds breadcrumbs for debug memo to try and narrow down sequence of
events leading to assertion failure with backspace.
Relates-to: #11706
Test-bot: skip
The debugger memo takes input with \n but internally represents this as
\r\n, so we need to strip out \r in order to track caret position
correctly.
Fixes: #13292
Adds support for using RichEdit 4.1, and sets the richedit control into
the correct mode for rendering arbitrary Unicode correctly. Removes
some unnecessary per-character refresh for improved performance.
Fixes: #12454
RichEdit allows text selection one character past end-of-string, so we
need to cater for that as well in passing text ranges to the character
grid.
Fixes: #12454