Move SemaphoreImpl implementation into a Semaphore.cpp file

Fixes #25