Convert gitaly-lfs-smudge to support running as a long-running process
gitaly-lfs-smudge is currently configured as a short-lived process: it is executed for every blob we want to convert from an LFS pointer to its object. This is inefficient, but had been a limitation of the Git project for quite a while. Nowadays there is support for running smudge filters as long-lived processes though. Git and the process will then communicate via pktlines and process all blobs in a single session, which significantly decreases the overhead because we only need to spawn one process.
We should convert gitaly-lfs-smudge to be long-lived to improve performance.
This was discovered by @msmiley while investigating incident 6715, where a CPU profile on file-22 revealed gitaly-lfs-smudge
using almost 60% of the box' CPU resources.
Edited by Igor