refs #156 moved pthread_join() outside of critical section
Merge galera-3.x upto b2ac219c1d47798194c33e7e797a0edb5abb08e0