to the issue #1764 

I added sorting to interpolate.interp1d, so the values of x array might be in any order. I also added a new keyword argument assume_sorted=False, if assume_sorted==True, the sorting is omitted. Not sure if the way of sorting is the best one. 
I added a unit test, that checks if the behavior for unsorted arrays is the same as for sorted ones.

These are my first changes to the code, so please let me know if something should be done in a different way/place etc.