LDN-1823 adding back hasSortConstraints() and adding iterator access to QlConstraints in sort clause