Type swh-search module and define a proper interface
It's already mostly typed.
But some errors crept up and mypy did not say anything. So fix those, tests those so it's not coming back.
Along that road define a proper interface (as we did in storage).
Migrated from T2516 (view on Phabricator)