ENH: implement may_share_memory in C

memmap needs to call it in __array_finalize__ to determine if it can
drop the references on copies.
The python version if may_share_memory caused significant slowdowns when
slicing these maps.

closes gh-3364
ENH: improve performance of byte_bounds for continous arrays
MAINT: remove duplicated array extent calculation
Merge pull request #3371 from juliantaylor/mmap-slice-improve

Mmap slice improve