ENH: make interp2d accept unsorted arrays for interpolation.

Change prompted by terrible error message in gh-3489.