Add a wrapper to manage a sorted list.
For now this is only used by sorted_sha1, but we'll need it for origin_metadata soon.