Fix SchemaIndexHaIT to not use IndexDefinitions accross databases

IndexDefinition are tied to the database that created them and
expect to be in a transaction in that database in all their
method calls.  The only exception to this rule are equals() and
hashcode(). This allows to search all IndexDefinitions of another
database for an equal IndexDefinition easily.