Avoid visiting the same packages twice in the subsetter.

Record which packages we have seen in a hash table and don't recurse
upon them if we have seen them before. Improves speed dramatically (45
min to 15 min on a scheme-full).

Tested file lists are the same for scheme-tetex and scheme-full, with
and without this diff.

Costs more memory, but 60MB for a scheme-full is OK.