Run `tap --repair` as part of `prune`

And by extension, `cleanup`.

Fixes #18658.