Correct and simplify the ProcTests for threads.

Using clone() for creating threads is not advised because glibc expects
thread local storage to be set up in particular ways.

Review: https://reviews.apache.org/r/20632