opencv: Build ffmpeg plugin, fix memory leak in viz module

PR to fix some problems with opencv ffmpeg plugin:
- the prebuilt plugin binaries that ship with source distribution are used;
- mingw32 package installs x64 ffmpeg plugin binary;
- x64 ffmpeg plugin doesn't load due to wrong dll suffix.

Added small patch from upstream to fix huge memory leak.