Fixed compilation errors under VS 2010 and Win 7

Applied in PR3240 to 2.4 branch.
Fix linking error under Win 7 - do not import MinCore_Downlevel.lib if target is Win 7 or earlier.

Applied in PR3243 to 2.4 branch.
Fixed MSMF video capture initialization

Applied in PR3251 to 2.4 branch.
Fixed assertion warning in MSMF frame grabber

Applied in PR3251 to 2.4 branch
Fixed MSMF file capture error while opening the file containing unsupported video stream format

Applied in PR3260 to 2.4 branch
CMake configuration for MSMF capture

Applied in PR3247 to 2.4 branch.
Fixed query of basic VideoCapture properties. Added tests for them.
Fixed compatibility with GStreamer 1.x
Added test on CAP_PROP_FRAMECOUNT option for cv::VideoCapture
set ffmpeg mutex to NULL on destruction.
Merge pull request #3267 from a-wi:MSMF_capture_fixes_v3
Merge pull request #3271 from mgeorg:reset_ffmpeg_mutex
Merge pull request #3269 from asmorkalov:ocv_gstreamer3
Fixed CMake issue with FFMPEG videoio configuration
Use FFMPEG capture only if HAVE_FFMPEG flag is defined.
Merge pull request #3277 from a-wi:CMake_FFMPEG_config_v3
Merge remote-tracking branch 'upstream/master'

* upstream/master:
  Use FFMPEG capture only if HAVE_FFMPEG flag is defined.
  Fixed CMake issue with FFMPEG videoio configuration
  set ffmpeg mutex to NULL on destruction.
  Added test on CAP_PROP_FRAMECOUNT option for cv::VideoCapture
  Fixed compatibility with GStreamer 1.x
  Fixed query of basic VideoCapture properties. Added tests for them.
  CMake configuration for MSMF capture
  Fixed MSMF file capture error while opening the file containing unsupported video stream format
  Fixed assertion warning in MSMF frame grabber
  Fixed MSMF video capture initialization
  Fix linking error under Win 7 - do not import MinCore_Downlevel.lib if target is Win 7 or earlier.
  Fixed compilation errors under VS 2010 and Win 7