MPSAFE - Add a set of general blocking/spinnable mutex functions.
These locks are intended to eventually replace lockmgr locks for most
use cases.
* Optimized based on in-line atomic_cmpset_int() calls with fallback call.
* Recursive shared and exclusive locks. Downgrading, and non-blocking
upgrading.
* Interlocked wakeup flags.
* Serial wakeup for exclusive waiters (i.e. optimal in the face of a large
number of waiting threads). Mass-wakeup for shared waiters.
* Additional entry points for spinning.
* Ref-count support, separate from lock count.