DBLock+IOVDbSvc+RDBAccessSvc: Common database lock.
Athena has multiple packages that access the database independently, for example IOVDbSvc (via COOL) and RDBAccessSvc. These are all locked internally, but they don't know about each other. Further, some of the underlying database code which they can both use, such as frontier, is not thread-safe. Thus, we can get crashes if, say, IOVDbSvc and RDBAccessSvc are executing in different threads.
To solve this without introducing a depedency between these packages, we introduce this package containing only this lock class. Any Athena package that needs exclusive access to the database layer can then acquire the lock here.
The DBLock object copyable; it holds the underlying lock via a shared_ptr. Further, the underlying mutex is recursive.
IODbSvc and RDBAccessSvc are modified to acquire this lock where needed.
This is attempting to address issues such as ATLASRECTS-5582.
Vakho (@tsulaia) should probably take a look at this before it gets merged.