tests: Add test for pthread

Calculates factorial using one thread for each multiplication and ```pthread_mutex``` for synchronization.