Instantiate model only once in pipeline
# What does this PR do?

The current implementation of `pipeline` is inefficient in the sense it instantiates the model twice just to guess the proper framework. This PR does not add any breaking change but reworks the function that infers the framework from the model to:
1. instantiate the proper class of the model (this avoids getting weird warnings about missing weights)
2. return the model instantiated so it's not re-instantiated later on.

cc @mfuntowicz  and @Narsil 
Checked all the slow tests run. I have no idea on how to implement a test that checks the model is only loaded once, so I'm going merge this and if anyone wants to tackle that, it can be done in a separate PR.