buffer: Pass lists to backend functions, not iterables.
Unbreaks swh-loader-core's tests, which are all red when run with the current swh-storage version.
Unfortunately, swh-storage's tests did not catch it, because the in-memory backend works fine with iterables, but the pg backend doesn't.
Migrated from D3649 (view on Phabricator)