hammer2 - Allow chains to be cached
* Cache chain structures on the refs 1->0 transition. We still drop the
underlying dio and backing data (future optimizations are possible here
within the DIO subsystem but we have to be careful when it comes to
leaving kernel buffer cache buffers locked).
This allows hammer2 to retain a lot of the infrastructure that gets reused
across multiple system calls without having to constantly reconstitute it,
improving performance.
* Fix a few recent chain->flags modifications that weren't atomic. They
have to be atomic.