hammer2 - Redo refactor code, fix races, add assertions
* Redo the refactor code which is used to detect when a chain
has been delete-duplicated so the caller can translate a stale
chain pointer into an up-to-date chain pointer.
The new code uses a simple chain flag, HAMMER2_CHAIN_DUPLICATED,
to flag that the original chain is now stale. The old code was
unnecessarily complex.
* Close several holes in the hardlink code where stale chains
were improperly being used as starting points for modifications,
resulting in filesystem corruption.
* Assert the a delete-duplicate is not performed on a stale chain.