Move refcount methods to HeaderWord
Summary: Upcoming diffs may add more fields to HeaderWord, so its cleaner
to have methods that can access fields other than count, instead
of CountableManip[NS] functions that take count as a ref param.
This is also a step towards having a true header class.
Having a template param for static/uncounted support in HeaderWord
also simplifies things by letting us collapse IMPLEMENT_COUNTABLE_METHODS
into a single macro.
This diff includes a few small changes in behavior:
- most methods call checkCount(), which is stricter than before.
- removed a few assertions on release paths that blow up when count == 0.
- the non-static version of decRefAndRelease() is now avoids
doing --count when count==1, similar to the static version,
instead of doing: if (--count) release();
Reviewed By: markw65
Differential Revision:
D2570230
fb-gh-sync-id:
cdc6171574cc53aea988a1eb8a49f99fab348d8d