sx: Add sx_has_waiters() macro
This macro will return non-zero if there are threads waiting for this
lock; otherwise, it will return zero.
The function assumes (but does not assert) that the caller already holds
the lock and that it is interested in other threads waiting for it to
release the lock.
The motivation to add this is the implementation of
rwsem_is_contended() in linuxkpi.
This Linux function indicates the same thing to the caller: if other
threads are waiting for this semaphore.
The amdgpu DRM driver started to use rwsem_is_contended() in Linux
6.12.
Reviewed by: bz, olce
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56443