Merge pull request #8577 from jordan-woyak/shared_mutex Common/Analytics: Replace mutex with shared_mutex and minor cleanups.