[OpenMP] Add sanity check for concurrent taskgraph reset
This patch adds a sanity check for concurrent taskgraph re-recording:
the case where two threads might simultaneously hit a taskgraph region
with the same graph_id and a non-zero graph_reset clause.
This will only trigger when debugging/assertions are enabled: it might
be more helpful to do this check unconditionally, but I'm not sure what
sort of error path in libomp should be used in that case.
Pull Request: https://github.com/llvm/llvm-project/pull/195076