Prior to this fix, we would become out of sync and fail to promote
Qt and SDL FDs to master when required, causing Qt's mouse to
disappear and the SDL video subsystem to fail initialization when
trying to stream.
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