xcursor: sync with libwayland

Merged Simon Ser requested to merge emersion/wlroots:bump-xcursor into master

xcursor.c was copied over from libwayland-cursor. A lot of cosmetic imporvements have been merged upstream. Copy-paste the new version.

Merge request reports