package.loader: Insert consistently data to storage, clear buffer proxy state in case of error when skipping artifact
Prior to this commit, we did not flush consistently data to storage.
Now for each revision, we flush all data (content, skipped-content, directory, revision...) to the storage (<- new). If any issue arose during the artifact loading, the data for the revision is cleared (<- new) and the branch is skipped (<- as before).
Related to T2352 Related to swh-storage!922 (closed)
Migrated from D2973 (view on Phabricator)