This adds a new KPI for use by object PIP and busy. In particular, it
replaces the ability to sleep on refcounts. My rationale is that
blocking sleeps of the form
while (*count != 0)
are at odds with refcount semantics: once a refcount value reaches 0 the
decrementing thread is the sole owner of the object, so dereferencing
the pointer represents a use-after-free. Moreover, the extra checking
needed for sleepers imposes overhead on all refcount(9) consumers, and
refcount(9) imposes overhead not needed for existing users of the
blocking counter interface. I think it is acceptable to have a small
amount of code duplication in order to separate the two types of users.
I made some opinionated changes to the interface, trying to reduce the
number of interfaces and making them more like our traditional
sleep/wakeup interfaces, for instance by handling PDROP.