Custom pipeline
# What does this PR do?

This PR adds the ability to support custom pipelines on the Hub and share it with everyone else. Like the code in the Hub feature for models, tokenizers etc., the user has to add `trust_remote_code=True` when they want to use it. Apart from this, the best way to get familiar with the feature is to look at the [added documentation](https://moon-ci-docs.huggingface.co/docs/transformers/pr_18079/en/add_new_pipeline#adding-it-to-the-list-of-supported-tasks).

Note: this PR changes the newly added `PIPELINE_REGISTRY.register_pipeline` API to accept all the arguments one by one instead of inside a big dictionary. This makes the API easier to use in my opinion.
_The documentation is not available anymore as the PR was closed or merged._<|||||>@sgugger what is your opinion on using attrs for validation with the representation of the pipeline task? I think it would be nice if it has a validation step here.  (this means introducing `attrs` as a transformers' dependency).<|||||>Yes, the doc clearly states that you need to save your custom pipeline in a module and import it from there. I could add support from writing something from `__main__.py` but maybe in a followup PR that also deals with custom models/tokenziers/configs etc?<|||||>[Line 655](https://github.com/huggingface/transformers/blob/f4e172716b91b477ce3cddc9a253094b7121a4b8/src/transformers/pipelines/__init__.py#L655) in
https://github.com/huggingface/transformers/blob/f4e172716b91b477ce3cddc9a253094b7121a4b8/src/transformers/pipelines/__init__.py#L649-L657
will call
https://github.com/huggingface/transformers/blob/f4e172716b91b477ce3cddc9a253094b7121a4b8/src/transformers/pipelines/base.py#L257

In the current version, we have `model_class` not being an `Auto` class for `(TF) ImageClassificationPipelineTests`, and we get test failure `TypeError: ('Keyword argument not understood:', 'trust_remote_code')`

https://github.com/huggingface/transformers/runs/7421505300?check_suite_focus=true

Adding `TFAutoModelForImageClassification` in `src/transformers/pipelines/__init__.py` will fix the issue.
