Fixes bugs in MSMF video capture.

Bug fix for http://code.opencv.org/issues/3621.
-Closes video device properly. -Fixes changing frame size (set method). -Extends set/get methods to handle frame rate. -Minor code refactoring and optimization.
(Due to the differences between 2.4 and 3.0 base code there is a separate PR for 2.4 branch: https://github.com/Itseez/opencv/pull/2670 ).