Refactor resuming of imports

Instead of recording only the most recently imported path and assuming
that all previous path have also been imported, we record all imported
paths and skip recorded paths when resuming the import.

This fixes an issue where parallelism would screw up the import order
and reimport some files. It also allows us to record singleton items.

We can apply the same strategy can be applied for incremental imports.