Adds test for pthread.

The test uses pthread to calculate the factorial of 12, with one
thread for each multiplication. pthread_mutex is used for synchronization.