Allow to set an error handler similar to XSetErrorHandler
Some applications have crash handlers such as e.g. the Firefox crash handler that allows to upload reports. Wayland protocol errors, however, AFAIK can not be handled right now - any protocol error will trigger a direct abort in libwayland.
In order to make it easier for applications to gather telemetry about such protocol errors, it would be nice if a custom error handler could be set - AFAIK this would be similar to
Firefox issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1726923