Convert ChangeBatchIndexer to more of a builder pattern
There was a single method with two required and many optional
arguments. Move the optional arguments into setters, except for the
project count, which we just cheat and extract from the input only if
the input is a Collection (which is 1 of the 2 callers).
This refactoring exposes and fixes a likely unintended behavior: we
should not recheck mergeability during online reindexing. The purpose
of online reindexing is to get a new index schema version up and
running in a timely fashion, without overloading a running server.
Checking mergeability by default was not helping here; I think it was
just an unintended quirk due to the way MergeabilityChecker was
injected into the ChangeBatchIndexer constructor.
Change-Id: Ifec986ef3c976ddeb00dd4218c5d029de9dc905e
3 files changed