Removed unnecessary check (Coverity #1219872).
Initialize variables inside thread lock (Coverity #1219873/#1219874).
Added missing field initializer (Coverity #1107350).
Zero-initialize variable (Coverity #1219904).
Initialize thread counters in constructor (Coverity #1233759 / #1233760 / #1233761).
Merge pull request #77 from fancycode/coverity_fixes

Coverity fixes