This addresses the test instability. The underlying problem still exists, but it's unlikely to trigger user-facing issues because of that. A repo instance won't be reused after gc() call. Fixes #3537
rebase_descendants()
rewrite::rebase*()
CommitRewriter
rebase_commit_with_options()
CommitRewriter::replace_parents()