[scudo] Add ScopedTSD to avoid releasing TSD manually (#80061)

This makes the use of TSD be RAII style and avoid the exposing of the
type of TSDs.

Also move some thread safety analyses from static to runtime because of
its limitation. Even we mark some code path as NO_THREAD_SAFETY_ANALYSIS
but we still have the `assertLocked()` cover the correctness.

GitOrigin-RevId: 8ce036d539cdaaee50ce7c63f963b7d68c43282e
5 files changed