buffer: add support for snapshots
This is mostly a consistency addition, considering that most (if not
all) loaders will only add a single snapshot.
The common pattern of loading objects in topological order (content >
directory > revision > release > snapshot), then flushing the storage,
is now fully consistent; Without this addition, the snapshot addition
would reach the backend storage before all other objects are added,
leading to potential inconsistencies if the flush of other object types
fails.