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
I just noticed ClassVersion 12 has 2518470540 as a checksum. Do I understand right that `pat::Photon` was changes in CMSSW_7_0_X but not in CMSSW_7_1_X? If yes, I guess the solution is simply to revert the change.