Added clamp() for THRESH_TRUNC mode
Optimized memory access by using stride pattern
Merge pull request #2751 from akarsakov:ocl_thresh_opt