Streamline bootstrapping

- don't write lock file until snapshot is complete to avoid inconsistency
  between sources and lock file in case of errors
- collect errors while getting sources for multiple packages, output all
  errors at the end
- internal: remove unused code