fixing a bug when x is unsorted while calling interp1
adding a test for interp1 when x is unsorted.
improving test for interp1.
Merge branch 'fix-interp1' into development