Pkg.release: better error handling in case of no registered commits.

The previous logic would go into an infinite loop -- I forgot that
prefetch returns a list of missing hashes and doesn't error out.