Reduce the number of transactions for import (See #10740)

Much of the overhead in the directory creation phase of import is caused by starting multiple transactions. This is a collection of small changes which allow work to happen in the same transaction **without** functional differences.

See https://trac.openmicroscopy.org.uk/ome/ticket/10740#comment:18

/cc @jburel @ximenesuk @pwalczysko