gpu TVL1 Optical Flow optimization:

do not calculate sum of error in every round of iteration;
instead the error will be summed every 2nd times or more, 
if the previous sum of error is too far away from threshold.
Merge pull request #1346 from jet47:gpu-tvl1-optimization