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.
1 job for !181 with thread-local-do-reference-counting in 47 minutes and 45 seconds (queued for 533 minutes and 30 seconds)
detached
Status Job ID Name Coverage
  Build
failed #73836
linux kf5-qt5 qt5.12

00:47:45

47.0%
 
Name Stage Failure
failed
linux kf5-qt5 qt5.12 Build
build: found 16373 matching files and directories  
WARNING: Uploading artifacts as "archive" to coordinator... failed id=73836 responseStatus=502 Bad Gateway status=502 token=uWtCgeAz
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... failed id=73836 responseStatus=502 Bad Gateway status=502 token=uWtCgeAz
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... failed id=73836 responseStatus=502 Bad Gateway status=502 token=uWtCgeAz
FATAL: invalid argument
Cleaning up file based variables
ERROR: Job failed: exit code 1