SharedBuffer: Refactor release() logic

We refactor this mildly in the hopes of making this a little easier
to follow for future readers.  We also go through the dealloc()
method so if we decide to invoke the SharedBuffer destructor in
the future, we only need to remember it in one place.

In addition, this is slightly more efficient in the multi-owner
case, since we no longer subtract to 0 and then (redundantly) set the
reference count explicitly to 0 as well.

Change-Id: Ifc773bd7900c89c36ac24904b2716f02cb57c095
1 file changed