Merged  CMS patches to most recent fastjet 3.1.0

This applies the CMS-specific patches for thread safety to the most recent fastjet 3.1.0.