patches/vlc: MediaCodec: simplify jni thread attach/detach