WIP: pv-runtime: Reference-count lock data structures
This lets more than one thread hold a reference to the lock, with the lock only being released on last-unref.
We don't need this yet - I implemented it when I was thinking about maybe doing runtime cleanup in a background thread, which would benefit from giving that thread a reference to the lock.