Added pfork_shm and tests for pfork/pfork_shm

pfork_shm provides a convenient way to use pfork while using one or
more shared memory variables for the return value(s)