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.

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