[OpenMP] Ensure `Devices` is accessed exlusively (#74374)

We accessed the `Devices` container most of the time while holding the
RTLsMtx, but not always. Sometimes we used the mutex for the size query,
but then accessed Devices again unguarded. From now we properly
encapsulate the container in a ProtectedObj which ensures exclusive
accesses. We also hide the "isReady" part in the `getDevice` accessor
and use an `llvm::Expected` to allow to return errors.

GitOrigin-RevId: 66784dcb3b4302cea606c3e74913350197b7ed45
9 files changed