Fix ConditionVariable#signal to only post if semaphore has waiters

This fixes a bug where calls to #signal would end up "over-posting"
the semaphore, causing subsequent waits to return immediately until
the semaphore value is back down to zero.