ENH: interpolate: refactor interp1d to use the same axis handling mechanism as the polyint interpolators

Refactor interp1d to use the same axis/inputshape handling code as the polynomial interpolators. Simplifies the code a bit, and ensures that all of the interpolators behave the same way.

Follow-up to #221 and can only be merged after it. Only the last commit 2c381e20e587e928f38547c08c5  is of interest for this PR.