Wait for transactions to go through when importing scans

This was work thought necessary to address datomic timeout issues, but turns out to be a subtle bug waiting to happen. We need transactions to go through before the next one starts (for data consistency).