move memory intrinsics to a `mem` module

The only remaining intrinsics in the `intrinsics` module are numeric
intrinsics, so it will be gone soon.