[LifetimeSafety] Add implicit tracking for STL functions (#170005)
Add support for tracking STL container methods and free functions in the
lifetime safety analysis.
- Added `VisitExprWithCleanups` to the `FactsGenerator` to properly
handle expressions with cleanup code
- Moved `shouldTrackImplicitObjectArg` and `shouldTrackFirstArgument`
from `CheckExprLifetime.cpp` to `LifetimeAnnotations.h/cpp` to make them
available to the lifetime safety analysis
- Enhanced the lifetime analysis to track STL container methods that
return pointers or references dependent on the container's lifetime
(e.g., `begin()`, `data()`, `c_str()`)
- Added support for tracking free functions like `std::begin`,
`std::data`, and `std::any_cast` that return pointers or references
dependent on their arguments
Fixes https://github.com/llvm/llvm-project/issues/162622