We previously nuked all refs not seen in the import using _seen_refs, by
comparing to a full list of original refs. That works okay when doing a
full repository rewrite, but fails for partial history rewrites.
Further, external rewriting tools that wants to implement a tweak of
this behavior would have had to access the internal _seen_refs field,
but might not be able to rely on _orig_refs if they were doing a partial
history rewrite. Fix both by tracking both which refs were exported
from the source repository, and which were ultimately imported into the
target repository (they may differ due to pruned commits, renamed
branches or tags, etc.). Make both available via a new public API,
get_exported_and_imported_refs().
Signed-off-by: Elijah Newren <newren@gmail.com>