Fixes bugs related to MSMF video capture.

(This patch fixes issues reported in 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.