pack: move nth_packed_object_{sha1,oid}