cuvid: Use the shell window instead of creating our own
cuvid: clear function pointers after freeing the lib
Cleanup pthreads lockmgr
Respect channel expansion settings when creating the initial mediatype
LAV Splitter: Fix the filtering of non-forced PGS subtitles.

PGS segments with just a header were mistakenly ignored. This included "end of display" segments so it could result in no subtitle being displayed at all.
Update ffmpeg and switch to w32threads
Add helper functions for safe unicode transformations.
Check all uses of MultiByteToWideChar and WideCharToMultiByte

Fixes issue 452.
Update libbluray
Update ffmpeg
Disable native opus decoder until the swresample/avresample situation is worked out.

Opus decoding is still supported through libopus, of course.
Fix safe conversions functions in the case of too long inputs