[GEOS-6564]:WCS Granule stack duplicated entries + unit test for multi d...

...imensional output (backport to 2.5.x)