T-API: minor optimization of morphology operations

check_regression=*OCL*Erode*:*OCL*Dilate*:*OCL*Morph*
test_filter=*OCL*Erode*:*OCL*Dilate*:*OCL*Morph*
test_modules=imgproc
build_examples=OFF