Make deadlock test faster and more correct

The stderr deadlock was happening when manhole thread is crying to
stderr in the same time that the user call os.fork. This deadlock is
very easy to reproduce on Python 3 and pypy.

The test is testing now exactly this case:

    manhole.install()
    pid = os.fork()

To make the test faster, the loop moved into the helper, since the
testing infrastructure is not efficient enough, taking more than 200
milliseconds to run and wait for a process.

This change decrease the time from 26 seconds to about 1.3 second on my
laptop when using Python 2.7.