Added the performance test for mog and mog2.
Removed whitespace.
MOG&MOG2: Modified the performance test according to the feedback of the community.
Revised performance test according to the feedback of the community.
Fixed a few tests that use uninitialized inputs.
Fixed a memory access error in CV_Remap_Test::generate_test_data.

begin_x[1] is not the second component of the element, but the element
after the one pointed to begin_x. When begin_x points to the last
element, that line overwrites data past the end of the allocation, which,
during my tests, happened to contain the reference count for the matrix.
Hilarity ensues.
Removed unnecessary process for conversion to 4-channel format.
Merge pull request #1409 from SpecLad:imgproc-test-memerr
Merge pull request #1396 from melody-rain:2.4_perf_bgfg_cpp