Resynchronize the window selection on any local cursor update

The window selection should be synchronised every time the local user's cursor is moved. When the local user's selection is modified using the keyboard, the event trap never loses focus, so the focus event is not fired, meaning the window selection was not being reset.

Now, the local cursor's update event is directly subscribed to, and if the document has focus, the window selection is reset. Note, if the document does not have focus, no reset will occur to prevent focus stealing.

Fixes a regression introduced in 8de8dde.