video: add input validation for OPTFLOW_USE_INITIAL_FLOW in calcOpticalFlowFarneback (port to 5.x) - #30100
This is a port of #30086 to the 5.x branch.
Added `CV_Assert` validation for `OPTFLOW_USE_INITIAL_FLOW` in `calcOpticalFlowFarneback` to ensure the initial flow matrix is not empty, matches the input size, and has the correct type (`CV_32FC2`). Also added corresponding unit tests in `test_OF_accuracy.cpp`.