Reintroduce something similar to _hg2git_fill_cache, but in fsck only

Fsck suffers from a serious performance regression after e065f8eb.