Improve performance of index lookup with tx state.

Performing an index lookup in a transaction with state was implemented as a linear scan over the transaction state. Even if the lookup from the underlying store was fast, the performance would degrade linearly to the size of the active transaction.
This change set improves the performance of index lookups in a transaction in a transaction with state by building up an index-like structure in the transaction state as well. This index state is built for the indexes defined by the schema.
Sure, it communicates intent more clearly, and the indirection is horrible any way so what's another layer? I've not used `Collections.newSetFromMap(...)` before so I didn't think of it, but it is pretty much what I wanted. I'll update.