[flang][OpenMP] Identify affected loops, provide reason (#185299)
Implement utility functions to calculate the number of affected loops in
a sequence or in a nest. Provide a reason for the returned value to be
used in an explanatory message.
Issue: https://github.com/llvm/llvm-project/issues/185287