Lazily open database connections in ChangeIndexer tasks

These connections are only needed in the request scope environment
when continuing work in a different thread. Most indexing operations
(e.g. from new-style REST APIs) don't happen in a request scope, so
don't need to tie up a database connection on the off chance that
RequestContext.getReviewDbProvider() is called.

Change-Id: Ide04ffc61dc73b2c816ed29ee018c83e948f6f1d
1 file changed