Fix forward port from CMSSW_7_1_X to CMSSW_7_2_X

This is the merge by hand of CMSSW_7_1_X into CMSSW_7_2_X and it's meant to replace #4228 (which will be closed once this is merged). As Requested by @Martin-Grunewald, the changes in 988dc0d where dropped during the merge. I did not drop those from @fwyzard, though.

This is a forward port of the following PR:

- #4116
- #4109 
- #4163 
- #4167 
- #4198 
- #3991

The following PR:

- #4177 
- #4138 

got ignored when merging.