Redmine#6674 Modifying hashing function to add info about index boudaries

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.
Adjust acceptance test for Redmine#6674
Fix test relying on specific order of getindices.

As getindices returned list is not guaranteed to be in any specific
order we should sort the results before comparing expected and actual
test results.
Merge pull request #2033 from pasinskim/redmine_6674

Redmine#6674 Modifying hashing function for multi-indexed arrays