Add listing 2.3 code

This shows the RAII idiom can be used to make sure that all threads are
safely joined before leaving the current scope.
Add listing 2.5 code

This demonstrates how to write a function that returns a thread object
to the caller.
Add listing 2.6 code

This shows how to write a ScopedThread class that will automatically
join the thread when you reach the end of the current scope.