Added a missing semicolon.
Added missing return values.
Use a smart pointer for the shared thread data.

The class ThreadSharedData has been renamed to SharedThreadData. A smart pointer named
SharedThreadDataPointer has been added, which makes use of intrusive reference counting.
Using a smart pointer, the resources are automatically freed if an exception is thrown.
Added a thread handle to the SharedThreadData.
Fixed a comment.
A better implementation for semaphore::try_wait_until (in the RTX wrapper).
A bit more work on the mutex implementation of the RTX wrapper.