reorder KS special cases for NaN
reorder KS special cases for NaN

The NaN checks were evaluated after the checks for sorted inputs, and
because slices with NaNs are unsorted, the NaN checks were unreachable.
 I’ve reordered them to be in line with the spirit of the code.

gonum/gonum,gonum/gonum,gonum/gonum