Stop build_index looping forever on an unindexable batch
SQLiteSearch.build_index advanced its pagination cursor only inside `if documents:`, so batches where all documents were rejected (no text-field content) never advanced the cursor and looped forever. Forward-port of #41249 from version-16-hotfix.