Limit retrying of submitted changes to 12 hours

Recently we discovered a change that has been retrying submit every
5 minutes since November, 2012. The change is unsubmittable due to
an unresolved dependency.

isSubmitStillPossible() is potentially broken in this case and may
be allowing changes to wait forever rather than DEPENDENCY_DELAY (15
minutes). Although the project should also fix whatever underlying
cause exists here, changes should never be allowed to automatically
retry submit for more than 6 months with no human intervention.

Be more conservative by retrying a change for 12 hours. If an
identical failure message is going to be posted, abort the submit
by setting the change status back to NEW. This requires a human to
revisit the change.

Adjust where the secondary index is invoked to ensure it gets
updated after the change was modified by MergeOp.

Change-Id: I4b2b73c2edbf61459c398e4fcc5cad7d504ba8b0
1 file changed