Fix race condition in Arc's get_mut and make_unqiue
Fix race condition in Arc's get_mut and make_unqiue

This commit resolves the race condition in the `get_mut` and
`make_unique` functions, which arose through interaction with weak
pointers. The basic strategy is to "lock" the weak pointer count when
trying to establish uniqueness, by reusing the field as a simple
spinlock. The overhead for normal use of `Arc` is expected to be minimal
-- it will be *none* when only strong pointers are used, and only
requires a move from atomic increment to CAS for usage of weak pointers.

The commit also removes the `unsafe` and deprecated status of these
functions.

Along the way, the commit also improves several memory orderings, and
adds commentary about why various orderings suffice.

nwin/rust,l0kod/rust,dwillmer/rust,mvdnes/rust,pshc/rust,jroesch/rust,dwillmer/rust,jashank/rust,GBGamer/rust,mvdnes/rust,pshc/rust,jashank/rust,l0kod/rust,zubron/rust,dwillmer/rust,jashank/rust,reem/rust,pshc/rust,dwillmer/rust,pshc/rust,nwin/rust,GBGamer/rust,graydon/rust,jroesch/rust,zubron/rust,vhbit/rust,GBGamer/rust,reem/rust,vhbit/rust,reem/rust,aidancully/rust,GBGamer/rust,vhbit/rust,jroesch/rust,jashank/rust,nwin/rust,reem/rust,nwin/rust,dwillmer/rust,graydon/rust,dwillmer/rust,jroesch/rust,mvdnes/rust,jashank/rust,l0kod/rust,reem/rust,aidancully/rust,reem/rust,nwin/rust,nwin/rust,graydon/rust,jashank/rust,zubron/rust,vhbit/rust,vhbit/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,zubron/rust,zubron/rust,graydon/rust,jroesch/rust,vhbit/rust,aidancully/rust,aidancully/rust,dwillmer/rust,pshc/rust,dwillmer/rust,mvdnes/rust,l0kod/rust,vhbit/rust,jroesch/rust,GBGamer/rust,zubron/rust,mvdnes/rust,jroesch/rust,aidancully/rust,jashank/rust,graydon/rust,jashank/rust,pshc/rust,l0kod/rust,pshc/rust,vhbit/rust,nwin/rust,jroesch/rust,l0kod/rust,l0kod/rust,mvdnes/rust,l0kod/rust,zubron/rust,zubron/rust,GBGamer/rust,nwin/rust,pshc/rust