Added unit test for CAY-1658: Add sort ordering enhancements to SelectQuery. Incorporated patch from John Huss, modified to support constructor chaining and moved null-check for orderings to addOrderings() method.