Reduce the number of temporary byte[20] arrays allocated.
While searching for and loading an object from a pack file we were
allocating two 20 byte arrays: one to store the temporary object id
during index searching and another to store the variable length header
data (as well as an OBJ_REF) during object fetching. But we can easily
combine these two together to reduce the amount of garbage we need to
load onto the heap.
When searching multiple pack files for an object we can easily share
the same byte[20] array across all of them by passing it down as a
parameter until one of the packs returns with the desired object.
This reduces the amount of garbage we generate when there is more
than one pack file open. But it also complicates the API a little
and isn't very "Java like" so we should document this odd behavior.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>