Revert "[gcc-4.7 support] refactored ThreadPool, fixed DB;"

This reverts commit 68fb7ef8d53b9ce9d196dcd2edd7e62e8fb8d860.