make some module thread_unsafe::DQMEDAnalyzers, few fixes and general cleanup

@leggat
have a look at this PR. I have made several changes on top of your PR #3723

the beginJob and endJob transition are not triggered anymore in the new model. I have removed them and moved their content somewhere else.

please let me know if you are ok with the changes.

thanks and cheers,
F.