This change implements the callbacks dpy_cursor_define and dpy_mouse_set
for the Cocoa UI. The incoming mouse cursor image is converted into an
NSCursor object, allowing the guest mouse cursor to be rendered as the
host's native OS cursor on macOS.
This is straightforward in absolute pointing mode, but rather trickier
with a relative pointing device:
1. The cursor position in Qemu's coordinate system must be translated
and converted into macOS's Core Graphics/Quartz coordinates when
positioning the cursor. Additionally, the position already includes
the hotspot offset; we'd prefer to use the host OS's hotspot support
so we need subtract the hotspot vector off again.
2. Setting the cursor position programmatically on macOS biases the
next mouse movement event by the amount the cursor was shifted.
If we didn't reverse that bias when forwarding the next event
back into Qemu's input stack, this would create a feedback loop.
(The behaviour of affecting mouse events makes sense for e.g.
setting the cursor position in a remote access system.)
This change slightly improves the user experience when using virtual
display adapter implementations which check for UI back-end cursor
support, and fixes the issue of no visible mouse cursor when using one
which does not. (Such as virtio-vga)