fix(pipelines): respect problem_type in image and video classification pipelines (#50582)
ImageClassificationPipeline checked problem_type == multi_label_classification
or num_labels == 1 before checking problem_type == regression, so regression
models had their outputs squashed through sigmoid (for num_labels == 1) or
softmax (for num_labels > 1). Check problem_type == regression first, matching
TextClassificationPipeline (#34066).
VideoClassificationPipeline unconditionally defaulted function_to_apply to
softmax in _sanitize_parameters(), ignoring model.config.problem_type and
overwriting initialization-time function_to_apply overrides on subsequent calls.
Defer the default to postprocess() based on problem_type, matching
AudioClassificationPipeline (#50329).
Co-authored-by: surendra902 <surendra902@users.noreply.github.com>