Introduce hash function for IndexSpace

The absence of a hash function is causing errors in Python 3 (see https://travis-ci.org/bartvm/blocks/jobs/44774200)