Changed property equality semantics

Instead of relying on Java's definition of equality, this commit changes so that we
compare the values. (long)8, (int)8, (short)8, (byte)8, (double)8.0 and (float)8.0 are
all equal, Strings and char are also comparable.

It also contains the neccessary changes to make sure that our indexes follow the same
semantics.