gc: make --prune safe for concurrent writes
This is a big one. Investigate how to do --prune
safely while we have concurrent writes/ref updates in the repository. See my comment here for the rabbit hole.
Filing this as a follow-up issue to this one where we do --prune now under a lock, in case we ever get to this.