Dqm multi threading offline clients 720 v2

This finishes up PR 5161 and addresses Marco's comments.