Fixed named semaphore in OS X

Fixed timeout conditions and destructor in named semaphores

- Adding no-timeout case
- Fixed timeout conditions:
   - The nowtime was not updated.
   - Named semaphores always retried sem_trywait() if rc!=0 is true.

- Fixed destructor:
sem_destroy() is not implemented in OS X.