Updating VideoStream to cv2, refactoring and added realtime kwarg

* Removing code lines commented out
* Updated VideoStream to use newer cv2 `VideoWriter`, cv
`createVideoStream` is considered legacy.
* Calculating `frametime` once in the constructor, this value doesn't
change. This we extra calculations are avoided.
* Added a `codec` parameter, so that `codec` can be set from the outside
and setting default to a newer codec like `xvid`. `iyuv` doesn't work in
many operating systems and it uses a lot of space for a video file.