fix uses of old api (Repo.{set,remove}_ref ObjectStore.add_pack)