ENH: implement may_share_memory in C to improve memmap slicing performance

closes gh-3364
ENH: improve performance of byte_bounds for continous arrays