Changed the semaphore handling for both SDL and Posix to use the same unified encapsualation in a struct.
Changed semaphore usage to use the new unified struct.