V0.7.x index spec

I've added HashIndex spec tests, and done some changes in HashIndex implementation.