Extra defensiveness around reindex timeout

commons was timing out after 10 minutes waiting on the optimize action.
So this will reset the timeout to what it ought to be before executing the
optimize (just to make sure) and then it'll catch any timeouts on optimize
and continue any way.  The optimize is technically optional, though we
want it to work.

Change-Id: Ic499835070ee979903b8568fb24782244df5aac0
(cherry picked from commit 5bb0c38641bb3e3ccd8623b585a67e2cf5aba594)