Push hashing logic to caller, where it is easier to understand.
Minor simplifications.
Simplify the SimpleHashTreeReader iterator by only storing exactly what it needs.
Promote some lock requiring code into "guarded_*" functions.