This is the last step that lets us get rid of LIBPATH variables and
link_directories() entirely, as recommended by the CMake docs.
It changes install_deps.sh to build shared (instead of static) FFMPEG libraries,
for consistency with other library dependencies and to simplify the logic. This
may require users of install_deps.sh to rebuild FFMPEG.
Some fixes were needed in the find FFMPEG module to make it actually work, this
code was unused up to now.
Followup to D8855.