Revert "changed mechanism of waking up threads at finalize(). there was some un-identified problem in PHIST with the previous version and now it seems to work."
Revert "changed mechanism of waking up threads at finalize(). there was some un-identified problem in PHIST with the previous version and now it seems to work."

This reverts commit 164c8bc750d0da4c49c6ca0abba86caab3dd9b32 because the problem was with multiple calls to ghost_init()/ghost_finalize() and we can keep the mechanism as it is.

RRZE-HPC/GHOST,RRZE-HPC/GHOST,RRZE-HPC/GHOST,RRZE-HPC/GHOST