Add a validation proxy for _add() methods.
It converts input dictionaries into swh-model objects, which validates them and raises an appropriate error.
This removes duplicated validation code that is currently present in all three storage backends.
It also uses well-defined object types instead of loose dicts, which gives these _add() methods a more strict type.
Depends on swh-model!76 (closed).
Migrated from D2640 (view on Phabricator)