Minor cleanups
Run requestFinished inside retry loop before commit
Retry on index-related IntegrityErrors

closes #1629