[clang][OpenMP] Rewrite `getOpenMPCaptureRegions` in terms of leafs (#97110)
Replace the switch in `getOpenMPCaptureRegions` with a loop collecting
capture regions based on the constituent directives.
---------
Co-authored-by: Alexey Bataev <a.bataev@outlook.com>