branch.py: Tolerate intermittent request failure during Gerrit polling
When waiting for the mediawiki/core change to merge, requests are made
to Gerrit every 5 seconds for up to an hour. Prior to this change, one
request failure would cause the entire process to fail.
To achieve a more fault tolerant polling process, allow consecutive
request failures for up to a shorter timeout of 1 minute, and reset the
failure timeout upon any successful request.