Rewrite Map using a hash-balanced tree

The gob-encoded deep copy approach was an easy hack but it failed in
important ways.  This complete rewrite uses a binary search tree where
the tree's keys are hashes of the user's desired keys.  This makes us
pretty certain the tree will stay reasonably balanced without having
to write a bunch of tree balancing code.

This passes all tests and is about 200x faster than the previous
implementation.  I hacked this code together pretty quickly and
there's lots of ugliness and repetitive code in there.  I hope to
clean it up soon.
1 file changed
tree: c39ac9e0ff19195fb0e5ee960844af17a2eb282d
  1. list.go
  2. list_test.go
  3. map.go
  4. map_test.go