media: Avoid racing subtitle loader threads

Fixes #2262