prefork: Fix 100% CPU usage in parent process

When a child process is terminated, the parent calls waitpid() to check
for dead children. This returns -1 on error (e.g. there are no other
children or a signal interrupted waitpid()), the pid (> 0) for dead
children OR 0 if there are some children which are still alive.

Fixes gnosek/fcgiwrap#18.
Merge pull request #20 from Lekensteyn/fix-bug-18

prefork: Fix 100% CPU usage in parent process