Change hashStats signature and fix bug that prevented caching
Use setImmediate instead of nextTick

Judging by the warnings Node is throwing, and the stack overflows I'm
getting, setImmediate is the appropriate function for recursive cases.
Add race-condition-proof hashTree for watching

This function may also be used for caching later.