sha1_file: add for_each iterators for loose and packed objects