Put short-lived hash iterator allocations on the stack

No reason to have these on the heap for such short whiles.
They are small (32 bytes) and only used within the same function.

v2: The external interface is preserved.

Signed-off-by: Lauri Kasanen <cand@gmx.com>