Fix race condition in PersistencySvc::addCnvService
This MR adds a (recursive) mutex and locks to protect accesses to the internal services map of PersistencySvc.
I also managed to add a test to expose (relatively) reliably the race condition.
Closes #314 (closed)
Edited by Marco Clemencic