Call SetCursor always on the UI thread.

Fixes #2862.
Merge pull request #2872 from unknownbrackets/windows-ui

Call SetCursor always on the UI thread