swh.indexer.*: Improve base class initialization scheme
This has the nice feature to ease initialization in tests.