Provide "real" selection content to aid text2speech tools

Text-to-speech and screen readers use the browser's selection to determine what the current selected text is. Some browsers (e.g., Safari on OSX) think the text content of the event trap is the currently selected content, and only vocalise the letter "b".

Cope with this by serialising the currently selected text to the input field on redraw. On a 1000 page text-only document, this can add sizeable performance impact (400ms to execute synchronizeWindowSelection), but as this only occurs when the cursor is updated, and only once per redraw, the actual end user impact is reasonably minimal.