[avalanche] Sanitize the thread safety checks in the processor
Summary:
This diff adds a cs_main runtime check to the proof isWorthPolling variant. The addToReconcile (and in turn the isWorthPolling visitor that it calls) is critical to get thread safe and avoid lock ordering issues as it is called from various threads (sceduler, net, ...).
Unfortunately clang thread safety annotation does not play well with std::variants as it assumes all the variants are reachable, making it complicated and inefficient to maintain the annotations.
As a consequence this diff also removes some annotations from addToReconcile and co. which are arleady present at the variant level and caught by the debug builds or tsan.
Test Plan:
With Clang and Debug:
ninja all check
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D15249