shards: reduce blocking in locking strategy (#186)
This commit is an attempt to reduce the blocking that occurs when
multiScheduler.Acquire calls pile up after a multiScheduler.Exclusive
call happens, waiting for already running searches to finish AND the
work protected by the Exclusive process.
To that end, we:
1. Remove the "Exclusive" lock functionality from "multiScheduler" which
now concerns itself only with controlling concurrent searches and
their fairness (interactive + batch).
2. Make "shardedSearcher.replace" work with batches to amortize the
initial loading sorting cost instead of sorting it on the search
path.
3. Leverage "runtime.SetFinalizer" to call "Close" on a
"*rankedSearcher" that was dropped when it is no longer referenced
anywhere by any on-going searches.
Co-authored-by: Keegan Carruthers-Smith <keegan.csmith@gmail.com>