Get index from cache (fresh or stale), triggering background rebuild if stale.
At most one rebuild per root runs at a time.
Returns None only if no cache entry exists at all.
Trims the RESIDENT cached index for root so each chunk keeps only its first
keep_lines lines of content, reclaiming the RAM held by full source
bodies once the embedding pass has consumed them.