Add a pretty unsafe unlock() to AutoMaybeLock.
Add more refcounting helpers.