DERBY-6227(Distinct aggregates don't work well with territory-based collation)

Backporting to 10.10

Had to hand tweek the changes in GroupedAggregateResultSet.java but there weren't too many changes. derbyall and junit suite ran fine.



git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/branches/10.10@1631604 13f79535-47bb-0310-9956-ffa450edef68