XWIKI-10268: SOLR startup sychronization should use less requests
* Iterate the Solr index and the database at the same time, both sorted in the same way, to eliminate the need to check for document existence.

(cherry picked from commit 68dcca0b368001925e84bc07458be6a3392ef6e5)