This unifies and centralizes the instantiation the same way the lister does.
This introduces a new base class `swh.loader.pattern.Loader` for all loaders whose only
concern for now is to instantiate loaders from either a configuration dict or a
configuration file.
This simplify instantiation in celery task code and avoids duplicating the configuration
load in each loader constructor.
The end goal is to simplify the future refactoring on configuration. With the following,
we will only have to adapt the Loader class when we finally start simplifying uniformly
the configuration.
Also note that I mostly reused the equivalent `swh.lister.pattern.Lister.from_config*`.
I did not refactor the common behavior (to avoid throwing another dependency in the
mix). That could always be refactored later.
Unfortunately the diff is a "tag" big but we can't really work around it...
(inspired by both the work on listers and the configuration system work)
Impacts:
- D5077: swh-loader-git
- D5075: swh-loader-svn
- D5078: swh-loader-mercurial
Related to T1410