[OpenMP][FIX] Ensure we allow shared libraries without kernels (#74532)

This fixes two bugs and adds a test for them:
- A shared library with declare target functions but without kernels
should not error out due to missing globals.
- Enabling LIBOMPTARGET_INFO=32 should not deadlock in the presence of
indirect declare targets.

GitOrigin-RevId: 9f87509b1902da2e98254f32bd32cc10eb88bb9e
6 files changed