HashMap: track dummies

We don't want to fill up our hashmap with dummies, as that degrades
performance. So track the dummy count, and rehash if the sum gets
too big.
Merge remote-tracking branch 'origin/feature-HashMapSpeedup'