util: introduce wl_object_get_{id,class}()
See https://lists.freedesktop.org/archives/wayland-devel/2024-April/043570.html for motivation; my compositor has a similar requirement so I'd like to be able to get the required information even with WL_HIDE_DEPRECATED
.
Added the new functions to util
because that's where struct wl_object
is declared, although normally clients would never access wl_object
s AFAIU so it could belong to server
as well.