More optimzations to sorting commits by path

We can enumerate all paths duing input parsing, we don't need to
capture them on the fly.

This means we only need to sort the memoized list once.

Also, paths are interned, so we can use the pointers rather than
the values as the hash keys.

This cut down the remaining 60s of directory packing to 52s in the
emacs historic cvs repository.

It has also removed the need for the hash table to include sorting
There may be some mileage in a specialized hash table for this
purpose rather than uthash.h