housekeeping: Clean up stale alternates and gitattributes locks
We're using transaction.CommitLockedFile()
to ensure atomic updates
with proper voting for both the alternates and gitattributes files. This
means that we set up a lockfile before committing the updated files to
disk. Naturally, it may happen that the lockfile never gets deleted if
Gitaly were to crash between creating and committing it. The consequence
is that any such stale lockfile may now obstruct all changes to the
target files.
We already cope with such stale locks for other filetypes, where we delete them after a grace period of 15 minutes in our housekeeping procedures. Extend this mechanism to also cover alternates and gitattributes to ensure that we can automatically recover from above situation.