posix: minor pthread_barrier clean up

This are the first two commits of #1307.

pthread_barrier_wait() needs to yield if it woke up a thread with a higher priority, and the Makefile of the accompanying test is cluttered.
When a thread with a higher priority waited on this barrier, then we need to schedule that one. Always if a thread with a higher priority gets un-blocked the current thread needs to yield.