Add support for sparse entries.

This also should also improve the memory efficiency, but I didn't bother getting numbers on that, I needed it for the functionality anyway, it's just a happy coincidence. :smiley: 
It seems difficult to get the expected hash length from there... I'd need to make the ```Logged```interface a bit wider, adding a static method to get that information?

I don't think it would help that much... If it's wrong, somehow, the only place this method is used is in ```LookupByIndex```, where the hash of the entry fetched itself is checked, so if there's any mistake at this point, either the entry will not be found (our in-memory index would be corrupted, but on-disk data would possibly be okay), or we'll find it, but fail that check (the on-disk data is corrupted).