Thread join fixes

- Thread join now operates on an event rather than an OS join. This is so we
  can eliminate race conditions between the decision to join the thread, and
  the thread cleaning itself up after threadEntry() has been called
- Removed unused Semaphore import in Lock.cpp