pthreadpool: fix helgrind error in pthreadpool_free()