Merge pull request #10 from vadz/master

Fix MSVS 2013 warning about a condition being always true.
Check stop condition under lock. Use emplace instead of push.
Do not call unlock() manually.
Use C++11 for(a:b) loop.
Use emplace_back() and for(a:b) loop.
Use two argument condition_variable::wait() instead of a loop.
added attribution
changed typedef to using
Semantic consistency and format fix.
Also replaced push with emplace when enqueueing.