stash: avoid sparse-index expansion for in-cone paths
masterA path-limited git stash expanded the full sparse index even when every requested path was already inside the sparse checkout.
Keep the index sparse when possible, expand it when a pathspec needs the full index, and fix a related out-of-bounds read. Paths outside the sparse-checkout cone retain their existing behavior.
18.87 s four index expansions
0.06 s zero index expansions