WL#13468: Improved CATS implementation

Affects: Server-8.0   —   Status: Complete

The Contention-Aware Transaction Scheduling (CATS) is an algorithm which we now
use to
prioritize the transactions for which many other transactions are waiting when
deciding who should get the record lock granted.
As of now the implementation has some subtle bugs (the computed weight might be
wrong) and performance issues (to update the weights we traverse wait-for-graph
under highly contented lock_sys->mutex).
This WL aims to solve both sets of problems by providing an implementation where
the whole weight computing procedure occurs in a separate thread, without holding
lock_sys->mutex, and with logic hopefully simpler to reason about.

Also, as of now, we have two algorithms for scheduling, the other being First Come
First Served (FCFS), and we have a (meta-)heuristic which decides which of the two
to use at the given time. This WL will improve the implementation of CATS to the
point where the FCFS will be redundant (as often slower, and easy to "emulate" by
setting equal weights in CATS). This WL will remove FCFS from the code, further
simplifying the lock_sys's logic.