qimport: record imported revs incrementally (issue3874)

When an import fails, this doesn't lose the state for the earlier
revisions.

--HG--
branch : stable
extra : amend_source : cc22de318b5a20c596dad3ab5f8e986a5bdc0c39