Make all DUChainReferenceCounting globals thread_local
Move the variables into a simple new DUChainReferenceCounting class to avoid the repetition of the `thread_local` keyword. Reorder the declarations and initializations of two variables - refCountingHasAdditionalRanges and refCountingRanges - to minimize sizeof(DUChainReferenceCounting) while preserving the logic of the variable ordering and grouping within the class. Eliminate the mutex and the redundant dependency between threads. This should work perfectly if the reference counting of each object is confined to a single thread. This will break code that calls DUChainReferenceCounting functions on the same object from multiple threads. Hopefully such code does not exist. This change does not break any kdevelop or kdev-python tests.
!181 with thread-local-do-reference-counting in 47 minutes and 45 seconds (queued for 533 minutes and 30 seconds)1 job for
||linux kf5-qt5 qt5.12||
|linux kf5-qt5 qt5.12||Build|