api: Replace manual exception registration with a declarative list
This will be used in the next commit to declare a handler for KafkaDeliveryError, which needs to be imported from swh-journal iff available
This will be used in the next commit to declare a handler for KafkaDeliveryError, which needs to be imported from swh-journal iff available