Adds thread-exit synchronization

Big Note: If a timeout is placed on synchronizing the exiting of the pthreads,
and it is exceeded, the pool becomes inconsistent. I use a SystemError instead
of a timeout, to force a fast-fail.