catfile: Drop inefficient Batch interface
The Batch interface was encapsulating two different processes, one process to retrieve information about objects without reading their data, and one process to read both their info and data. proves to be inefficient in a lot of cases though where we only need one of both halves. Given that the catfile cache is used a lot, it's already a frequent contender of spawn tokens. Doing this twice per created Batch process doesn't help. We have thus refactored the catfile cache and introduced two separate interfaces ObjectInfoReader and ObjectReader, where both only spawn a single process.
We have now converted all callsites to use these split-up interfaces, which should lead to a significant drop in spawned git-cat-file(1) processes. Remove the old Batch interface.
Changelog: performance
Part of #3763 (closed)
Closes #3841 (closed)