Limit threads used in Reindex to DB connection pool size

We open one database connection per thread, so it is not possible to
run more than database.poolSize threads total if pooling is enabled.
Limit the number of threads used by Reindex to this total.

Change-Id: Iac711896f845fa17f967ec3a322f253a3cb6fc59
2 files changed