CMS specific thread safety and C++11 fixes.

This is an all in one patch with the remaining thread safety and C++11 fixes done by the CMS experiment collaboration to fastjet. Change not endorsed by fastjet collaboration.