Fix clang warnings and errors in CondFormats/CastorObjects.

Removed unused variables.
Implemented thread-safe deletion in CondFormats/CastorObjects/src/CastorElectronicsMap.cc.