Speedup for pfork on OSX, adding pfork_shm for shared memory return values

* pfork_shm provides a convenient way to use pfork while using one or
more shared memory variables for the return value(s)

* added tests for pfork and pfork_shm

* The call to waitpid, on OSX (tested on 10.7 and 10.9) blocks for _one_
of the calls for about 2sec. This is usually on one of the first 3
fork IDs. I could not find out why...

As the previous reading from the pipe provides for the necessary
synchronization the call to waitpid is redundant. Uncommenting for
now.