Fixing sort on vectors for comparators other than <.
Also applying the dups fix analog to 0d36042bb1c6 for non-< comparators.
Better error message for invalid args to sorted?.