snap/clone promotion, flush, and other goodies

The only remaining issue that I am aware of with this branch is what happens
when promotion or flush races with the snap trimmer.  The last couple of
patches deal with the most basic cases but I have had a hard time trying to
reproduce those races so I don't have confidence that all cases are covered.

That said, this is passing the current regression tests (including a new
cases that exercises both cache ops and snaps; obviously not committed yet)
so I think it is ready for review and possibly merge.