DERBY-2699(performance of like in territory based collation databases may be improved by changing way collation elements are calculated.)

Backporting to 10.8. Fix contributed by Knut Anders Hatlen



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