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