Forward port of "Major DQM update needed for the online"

PR being forwarded:
https://github.com/cms-sw/cmssw/pull/4369