Fix forward port 71x

By hand fix of merge of CMSSW_7_0_X into CMSSW_7_1_X.

The following PR were picked up (recent first):

- #4102
- #4118
- #4204
- #4238 
- #4318 
- #4326 
- #4328

The following were ignored and will not be forward ported:

- #3774
- #4294
- #4246 
- #4325
Something is wrong here. I get a

```
>> Checking EDM Class Version for src/DataFormats/PatCandidates/src/classes_def_objects.xml in libDataFormatsPatCandidatesCapabilities.so
LD_LIBRARY_PATH=/build/eulisse/CMSSW_7_1_0-build/tmp/BUILDROOT/d8755e73764cac50b87d5c1648a3c5a6/opt/cmssw/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_0/tmp/slc6_amd64_gcc481/src/DataFormats/PatCandi
Automatic building of dictionaries now off
error: class 'pat::Photon' has a different checksum for ClassVersion 13. Increment ClassVersion to 14 and assign it to checksum 2518470540
gmake: *** [tmp/slc6_amd64_gcc481/src/DataFormats/PatCandidates/src/DataFormatsPatCandidates/libDataFormatsPatCandidatesCapabilities.so] Error 1
```

when building the release (but not in the IB..:-/). Ideas?