BUG: fix ndimage functions for large data

map_coordinates uses int to index into data arrays which can overflow
for arrays of several gigabytes size. Patch by @cgohlke.
some other occurances of int replaced by npy_intp for safety.
Closes gh-3733
Merge pull request #4143 from juliantaylor/ndimage-large-data

BUG: fix ndimage functions for large data