Fix threadpool for c++14.
This is causing g++-6 and MSVC to fail.
If-statment initializers are c++17. Replaced with the comma operator, which should return the second part and result in the same result.
Also addressed some minor warnings: an initialization order discrepancy, and a couple unused variables.