Thread safe fixes for DataFormats/PatCandidates

Changed caches used by the data products to be thread-safe. Also dealt with non-const statics.