stopBackgroundBuilds

Cancels every background build and waits for the one in flight to reach a segment boundary.

Called by close, and public because a lifecycle owner has to be able to stop the worker before it closes the store the worker is scanning — which is what Rabosh.close does. After this the catalog still works: a later createIndexInBackground starts a fresh worker.

Cancelled rather than waited out. A flush must be allowed to finish because it holds data the log would otherwise have to keep; an index build holds nothing at all, so abandoning one costs a rescan and no more. That asymmetry between data and derived data is the same one that lets a sidecar go unforced before the manifest names its segment.