rebase in-memory indexes on sparse_hash

It's not yet clear if this is the optimal design, but in an effort to move
to more memory-efficient maps, I've rebased on sparse_hash. It may be
preferable to use dense_hash_map, due to the [great performance
improvement offered by that model](https://google-sparsehash.googlecode.com/svn/trunk/doc/performance.html).

It took an embarassing amount of time to commit this change, mostly due to
the fact that sparse_hash_maps become corrupted if you call erase on a
non-existing key-value. Ouch.