Fixed BORDER_REFLECT and BORDER_REFLECT_101 extrapolation for case x > 2*maxV
Added workaround for Nvidia: take into account that 3-channel vector type takes 4*elem_size in local memory.
Fixed calculation of l_stack_size
Merge pull request #3186 from akarsakov:ocl_fixes