Revert "Move memory_map_[read|write] and reg to memory.c"

mips/stub.S expect those three buffers to be contiguous in
memory. Moving them to C does not ensure this.

This reverts commit d91116e4bcf39054986bb4b8242744caf75a14f7.