pack: expose a cached delta base directly

Instead of going through a special entry in the chain, let's pass it as
an output parameter.
pack: WIP use stack allocation for smaller delta chains

This avoid allocating the array on the heap for relatively small chains.