Correctly enable OpenCL mode in tapi's hog example.

For current OpenCV-CL architecture, if the data buffer
allocated in UMat are cpu buffer(not ocl buffer) under
cpu mode, and then pass this UMat to an OpenCL kernel
as an argument, the OpenCL path will fail and fallback
to cpu mode. Take HOGDescriptor::oclSvmDetector as an example:
    ocl::setUseOpenCL(false);
    //data allocated in hog.oclSvmDetector will be cpu buffer
    hog.setSVMDetector(HOGDescriptor::getDaimlerPeopleDetector());
    ocl::setUseOpenCL(true);
    //We enabled OpenCL, but hog.oclSvmDetector are cpu buffer,
    //so it will fail in the function ocl_classify_hists
    //when reach to this line
    //idx = k.set(idx, ocl::KernelArg::PtrReadOnly(detector));
    hog.detectMultiScale(img, found, hit_threshold, win_stride,
            Size(0, 0), scale, gr_threshold);

Similar problems heppen on img_aux and img. So we should re-define
or re-set these UMat when do mode switch (CPU -> OpenCL) in order
to make their data be allocated by ocl and then OpenCL path will
succeed.

Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
Update hog.cpp

Update according to vbystricky's comments
added performance validation check
Added support for YUV2RGB[A]_NV21 and YUV2BGR[A]_NV21 conversion
Added OCL code for YUV2BGR_YV12 and YUV2BGR_IYUV color conversions
Added OCL code for YUV2GRAY_420 color conversion
Added OCL code for RGB[A]|BGR[A] -> YUV_[YV12|IYUV] color conversion
Added OCL code for YUV422 -> RGB[A]|BGR[A] color conversion
Used direct float calculations
Optimize OpenCL version of conversScaleAbs function
Small optimization for buildMaps kernels in case rowsPerWI > 1
Added tests for Image2D
Optimize OpenCL version of StereoBM function
Fix problems on NVidia devices.
ocl: restore clFinish() in unmap() for AMD devices

This reverts commit 7d91b8efcd053304e5b0fb5afff06e151b2d4096.
Added extra checks to ocl::Image2D
Merge pull request #3368 from alalek:amd_clfinish
Merge pull request #3284 from vbystricky:oclopt_stereoBM
Move _dst.create() to the begining of scaleAdd function
Merge pull request #3342 from alalek:perf_stability_check
Merge pull request #3367 from akarsakov:ocl_image2d