MODE-2341 Fixed the reindexing behavior

This PR contains 2 fixes:
* the `RepositoryQueryManager` should not be marked as initialized until all components (including connectors) have finished initializing
* the `LocalIndexProvider` should always scan whenever `createIndex` is called because that means the index definition is new for the given workspace
the indentation changed because the ` if (index.isNew()) {` was removed. So IMO it should be reformatted since there is less left margin.