[Rust] Try to avoid normalizing by improving Hash impl for Value
Imported comment from the PR which included https://github.com/informalsystems/quint/commit/dd333e80c4847686913272aa79745ec3bf741706
Comparing by value instead of by string in the tests uncovered a problem.
In TS, we call normalForm() whenever we deal with keys on a Value::Map, which I was not doing here yet. This caused things like Set(2.to(4)).mapBy(s => s.size()).get(Set(2, 3, 4)) to fail, as the key on the map would look like Value::Interval(2, 4) while they key we are trying to get looks like Value::Set(2, 3, 4), which don't hash to the same thing.
It might be the case that changing the Hash impl to enumerate sets before hashing is better (more performant) than this. I just did what we already do in TS to unblock this PR, and we can try to optimize it later.
Can I start working on this?
@geooner Yes!