indexer: use a hashtable for keeping track of offsets

These offsets are needed for REF_DELTA objects, which encode which
object they use as a base, but not where it lies in the packfile, so
we need a list.

These objects are mostly from older packfiles, before OFS_DELTA was
widely spread. The time spent in indexing these packfiles is greatly
reduced, though remains above what git is able to do.
Merge pull request #1388 from carlosmn/hash-ref-delta

indexer: use a hashtable for keeping track of offsets