BUG: fix cumptrapz that was raising an exception when x !=None and axis not in (0, -1)
fix the previous fix that was breaking cumtrapz when y and x where nd and add tests for y nd and x 1d.
STY: some style cleanups for integrate.cumtrapz().
Merge branch 'pr-3068' into master.

See https://github.com/scipy/scipy/pull/3068