Fix Module opencv_cudaoptflow disabled (Bug #3788)

Removed opencv_legacy dependency from cudaoptflow