Make all DUChainReferenceCounting globals thread_local

Move the variables into a simple new DUChainReferenceCounting class to
avoid the repetition of the `thread_local` keyword.

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 60 minutes and 27 seconds (queued for 10 minutes and 10 seconds)
detached
Status Job ID Name Coverage
  Build
failed #73308
linux kf5-qt5 qt5.12

01:00:27

 
Name Stage Failure
failed
linux kf5-qt5 qt5.12 Build The script exceeded the maximum execution time set for the job
qt.qpa.events: Event | XCB_PROPERTY_NOTIFY(28) | sequence: 400
qt.qpa.events: Event | XCB_LEAVE_NOTIFY(8) | sequence: 400
qt.qpa.events: Event | XCB_PROPERTY_NOTIFY(28) | sequence: 400
qt.qpa.events: Event | XCB_PROPERTY_NOTIFY(28) | sequence: 400
qt.qpa.events: Event | XCB_PROPERTY_NOTIFY(28) | sequence: 400
qt.qpa.events: Event | XCB_ENTER_NOTIFY(7) | sequence: 400
qt.qpa.events: Event | XCB_PROPERTY_NOTIFY(28) | sequence: 400
qt.qpa.events: Event | XCB_PROPERTY_NOTIFY(28) | sequence: 400
ERROR: Job failed: execution took longer than 1h0m0s seconds