DERBY-6148 Wrong sort elimination when using permuted sort order
    
    Patch derby-6148-3. Adds lacking use of join order index map into
    optimizableList in method OrderByList#sortRequired. Also adds
    regression tests for previously failing (and a some good) queries.

Backported from 10.10 as svn merge -c 1485958.




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