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.
Add tests for KS NaNs and panics

Added tests for the special cases of KolmogorovSmirnov, specifically
when the inputs have NaN or the various ways that result in a panic.