End import stream after all writes.
End import stream after all writes.

Previously it would be possible for certain writes to the DAG Service to
occur *after* the stream had ended, meaning the Importer would return
objects that did not yet exist in the DAG Service.

This change defers stream termination until after those writes have
occurred, to preserve the powerful invariant of "element emission =>
written to dag service".

ipfs/js-ipfs-data-importing,ipfs/js-ipfs-unixfs-engine