ENH: add sorting to interpolate.interp1d, so the values of input may be in any order.

Closes gh-2283.
TST: add test for assume_sorted kw of interp1d, plus style cleanup for tests.
Merge branch 'pr-2946-interp1d' into master.

Reviewed at https://github.com/scipy/scipy/pull/2946