Add functions to generate HTTP API clients and servers from databases.
This moves the interesting parts of swh-indexer!421 (closed) into the core, so other components can use them as well.
Test Plan
make test
Migrated from D507 (view on Phabricator)