assist #11091: refactor server DB queries for hierarchy navigation

Fixes step one of http://trac.openmicroscopy.org.uk/ome/ticket/11091 and prepares the way for http://trac.openmicroscopy.org.uk/ome/ticket/11019. Batches and caches bulk DB queries for hierarchy navigation and has preprocessor and container service use the same query code. (Increases allocation of small Java objects to reduce traffic with DB and increase code reusability.)

To test, check for regressions in behavior that relies on graph traversal, including fileset splitting.