multi-thread safe porting with miniAOD-DQMsequence

This pull request supersedes the #4849 and #4843 since it is a merge of them. 
Automatically ported from CMSSW_7_2_X #4895