Not only is it faster to cache the function pointers, calling
dlsym() inside open()/close() can lead to deadlocks when using
Vulkan Video decoding on top of the Nvidia driver.
Other shared library constructors can invoke open()/close() before
SDL2-compat's constructor runs to load SDL3 and populate the SDL3
function table. This causes SDL_AtomicLock()/SDL_AtomicUnlock()
to jump to 0.
See #1707