Split HashTable out into mutable and immutable kinds.

There are some inference problems making the marketplace tests fail. I'll need same help fixing that up.
This seems like a very complicated function for doing what you are trying to do. It also doesn't work in all cases.

https://gist.github.com/shekari/5821908b19c233faae1f