Fix two bugs found in the CHashMap
Created by: bricehulse
These are fixes for two issues I ran into using CHashMap:
-
If you use alter() to change the value for a key that already exists in the map, the len field gets incremented, even though it should stay the same.
-
If you do a bunch of alternating insertions and removals, you can end up with a situation where every single bucket is either used or "free" (i.e. none of them are "empty"). If you try to insert another entry when this is a case, it goes into an infinite loop when it looks for a bucket to place the new entry in, because it expects to find an "empty" bucket at the end of the cluster, but there are no empty buckets.