This aligns the last writing endpoints to use BaseModel (Origin, OriginVisit) objects as input.
# origin_visit_add:
Before (after adding the type effectively used):
```
def origin_visit_add(
self, origin: Dict,
date: Union[datetime.datetime, str],
type: str) -> Optional[Dict[str, Union[str, int]]]: # results is both 'origin' and 'visit', only visit is used...
```
After:
```
def origin_visit_add(
self, origin: Origin,
date: Union[str, datetime.datetime],
type: str) -> OriginVisit:
```
# origin_visit_update:
Before (after adding the type effectively used)
```
def origin_visit_update(
self, origin: str, visit_id: int, status: Optional[str] = None,
metadata: Optional[Dict] = None, snapshot: Optional[bytes] = None):
```
After:
```
def origin_visit_update(
self, origin: Origin, visit: OriginVisit,
status: Optional[str] = None, metadata: Optional[Dict] = None,
snapshot: Optional[bytes] = None) -> None:
```
Impacts:
- swh-loader-core (runtime)
- swh-loader-svn (runtime)
- swh-journal (tests)
- swh-web (tests)
- swh-indexer (tests)
Depends on D2813