HPCC-10379 New semaphore implementation based on sem_xxx

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>