MODIFIED: Kill processes on exit/crash of Prolog unless they are detached.
Put detached processes in a process group.  Added process_group_kill/1,2.
Matt Lilley.