Made the semaphore more generic by introducing a value_type member typedef
Threads are movable now
Added a top-level wrapper for the callback and callback_wrapper