Update to new hashtree API

The hashtree module only exports `compare/4` now.

Remove some unused functions and dead code.