Use memoryviews in `skimage._shared.transform`

First PR of the memoryview overhaul.