Merge changes I8c5ab552,If8546dea

* changes:
  libsnapshot: tests uses common MapUpdateSnapshot/WriteSnapshotAndHash
  libsnapshot: Add test for accounting for hash tree