VideoCapture: copy the captured frame, to avoid dangling Mats

Previously, VideoCapture::retrieve would return a Mat that referenced
the internal IplImage. Since the latter is rewritten every time a
frame is captured, it means that if the user captures two frames in a row,
the first frame would reference nothing. Similar if a user captures a frame,
then destroys the VideoCapture instance.

Note that the other branch of the if isn't affected, since flip allocates
a new Mat.
Overload detectMultiScale API for ocl::haar.
fixed ocl::cornerHarris, ocl::cornerMinEigenVal and their accuracy tests
fixed warnings in OpenCL kernels
Let perf/accuracy test of ocl haar uses detectMultiScale api.
Fix image to be used by perf test.
added ocl::repeat
Update .gitignore.

* OpenCV4Tegra/ is no longer relevant.
* We should only ignore the particular refman.rst that we generate.
Sorted .gitignore.
came back to relative error
Revert "disable SVM when AMD BLAS is not available"

This reverts commit d63a38e9bfad4081ec8107e8d38e03c03f6548d2.

Conflicts:
	modules/ocl/test/test_ml.cpp
ocl: svm: restore non BLAS version
fixed ocl::copyMakeBorder accuracy test
Merge pull request #1749 from SpecLad:update-ignore
ocl: memory cleanup workaround: clFinish() before clReleaseMemObject() + 64kb memory guard
Merge pull request #1745 from alalek:ocl_fix_svm_with_blas
Merge pull request #1751 from ilya-lavrenov:ocl_copyMakeBorder_test_fix
Merge pull request #1752 from alalek:ocl_memory_cleanup_workaround
ocl: update documentation
ocl: update comments in ocl.hpp
Revert back test image.