pthread_join: Retry when interrupted as mandated by POSIX.

The spec explicitly states that pthread_join shall not return EINTR, so
we have to retry the wait when it gets interrupted instead of letting
the error code through.