Hashmap fixes
Adds functionality to grow a hashmap, can be used to pre-allocate elements when the final size is known.
Fixes overflows on re-hashing, although I'm not too sure how to test this in practice.
Implements #587 (closed).
Edited by Matthieu Schaller