move some non mmap stuff out of maps.c
move shm code out of trinity.c into own file