Return heap allocated results from pthread.
Removed unused lambda expression.
Added an example with std::async() for starting threads.