Add more retry logic to reindexing

Used to be we'd only retry on document write error.  Now we'll retry on
a query error too!

Change-Id: Ic037f0901984671679a46d1e894f69edee888136
Merge "Add more retry logic to reindexing"