Implement may_share_memory for GpuArray.

This is needed to have debugmode to don't uselessly warn about op that
declared to be inplace but didn't.
Merge pull request #1635 from nouiz/may_share_memory

Implement may_share_memory for GpuArray.