hush: add leak detector helper; fix/add tests for it