identifiers: Add to_dict method to SWHID class
This is needed for the /api/1/resolve/(swhid)/ endpoint implementation of swh-web (see D3467).
Migrated from D3465 (view on Phabricator)
This is needed for the /api/1/resolve/(swhid)/ endpoint implementation of swh-web (see D3467).
Migrated from D3465 (view on Phabricator)