Adding new examples for passing arguments to threads,
protecting cout with a mutex and doing a multithreaded
occupancy sum in a 1-D 'detector'.