[OpenMP] Introduce new file wrapper class for runtime

Introduce new kmp_safe_raii_file_t class with RAII semantics for file
open/close. It is essentially a wrapper around the C-style FILE* object.
This also unifies the way we error report if a file can't be opened.

Differential Revision: https://reviews.llvm.org/D92604

GitOrigin-RevId: 5aafdd7b88f5bad06431f34103a771fe681f9213
4 files changed