#pragma warning4127 fixed for cvstd.inl.hpp
move CUDA compilation step from ocv_glob_module_sources to ocv_add_library
use directory-based include_directories command if we build with CUDA
remove -fvisibility-inlines-hidden from CUDA compiler flags 

it generates warning
Enable OpenCL version of norm and convertScaleAbs or 32F data

Fix error in minmaxloc.cl
Change test for convertScaleAbs
Fix minMaxIdx for _src2 align
Change epsilon on the tests
fix cudabgsegm module compilation
#pragma warning4127 fixation modified

Now use cleaner approach:

#pragma warning( push )
#pragma warning( disable: ThatWarning )
//code with ThatWarning here
#pragma warning( pop )
Change epsilon for NORM_INF_2args accuracy tests
Fixed incorrect pointer conversion for in-place threshold
Minimal image size is set to 5*5 for OCL path of fastNlMeansDenoising and fastNlMeansDenoisingColored since it breaks tests with test_loop_times=30 and in general doesn't make sense for computation on GPU.
Set sync=true in ocl_minMaxIdx kernel call. For tests
removed optim module; moved its functionality to core and photo modules; moved drawing functions from core to imgproc. Removed FilterEngine etc. from public API
trying to fix builds
fixing more compile problems with Java bindings etc
Merge pull request #3098 from jet47:fix-cuda-compilation
trying to solve compile problems; temporarily disabled some tests for just added optimization algo's
fixed trailing whitespaces
Merge pull request #3102 from akarsakov:ocl_denoising_fix
Merge pull request #3101 from akarsakov:ipp_thresh_fix
Merge pull request #3103 from vpisarev:core_imgproc_optim_rearrangements