Relocate semaphore implementation (#57)

+1 for sys/posix, or better -1 for core, in order to keep the core as simple as possible.