Summary:
Catalog manager ideology is designed in the way where we should lock object for read in order to access its data.
Unfortunately there are a lot of handy functions that takes this lock silently.
So it could be unclear to reader that read lock was acquire.
But each read lock acquires and releases particular mutex twice, that significantly increase load in TSAN mode.
Patched ListTables and Create CDC stream code path to reduce amount of taken read lock on table info objects.
Also added utility classes to track time that we spend while holding some lock - `TimeTrackedSharedLock/TimeTrackedUniqueLock`.
Used it while debugging, but removed in final version to avoid unnecessary resource usage.
Jira: DB-14394
Test Plan: Jenkins
Reviewers: zdrudi, xCluster, hsunder
Reviewed By: zdrudi
Subscribers: slingam, ybase, esheng
Tags: #jenkins-ready
Differential Revision: https://phorge.dev.yugabyte.com/D40521