Restructured TS map computation

As close to final as it could get today.
I'd prefer you put this in `gammapy.extern`, even if it's modified.
Long-term we should contribute such improvements back to scipy and only maintain this in `gammapy` for an interim period.