Large fileset performance improvements (rebased onto develop)



This is the same as gh-1003 but rebased onto develop.

----

See https://trac.openmicroscopy.org.uk/ome/ticket/12027.  ```setId``` on the dataset mentioned in the ticket should now take 10 seconds or fewer over NFS.  I would expect similar performance improvements when running ```ImportCandidates``` against the relevant directory.