Thread safety -- Fix CastorObjects

This PR is replacing  #847 and includes Valentin's latest update (added initialisations).

The new version builds correctly and I successfully ran workflows 4.22, 8.0, and 1306.0 (the others are still running) in CMSSW_7_0_X_2013-09-19-1400 on slc6.

David, could you please schedule a Jenkins for this ?