Redmine#6674 Modifying hashing function for multi-indexed arrays

When using multi-index arrays hash function is looping through each
character in index without modifying hashed value once moving form one
index to another. That's why entries like a[te][st], a[tes][t], a[t][e][st]
and all other variations are resulting in having exactly the same hash.
While trying to add new array entry to RB tree having the same characters
in indexes previous entry is updated instead of new one being created.
Given Jimis's comment on the fix, I hope to see a later PR that adds a check that file2[2][0] is distinct from the two tested here; I would also like to see checks that file[220] and file[2][2][0] are distinct from file[22][0].