BUG fix lowess sort when nans closes #946

a bug in sorting when there were nans, see #946

with a few more unit tests for options