Fix lowess for constant inputs.

Fix with tests for #1798.
Ok, I didn't read carefully enough and didn't see the arange.

However, the test case that we need and that would have caused an error in the original change is to have a non-zero residual (fewer than half in any subsegment).

for example
after `'y': np.arange(20)`
change one value
`test_data['y'][10] += 5`
this observation should be ignored as an outlier and `'out'` should still be `np.arange(20)`
(assuming we have at least 3 observations in the median calculation.)