Generalize HiDimRes::getSubResourcesAssayMultiMap

so that we can find assays by arbitrary assay constraints instead of
just by query result.