calib3d/imgproc: add GCGraph::maxFlow() missing empty checks