std: Move mem to libprim
std: Stop (incorrectly) parameterizing some memcpy functions over RawPtr

This couples ptr and cast in a way that makes it harder to extract these modules.
It also is arguably incorrect since it makes unsafe assumptions that any impl
of RawPtr is for actual pointers.
std: Remove unused bump_box_refcount function
std: Stop using @ in cast module
std: Move cast to libprim