version.py: Accept 'gerrit' as remote name as well as 'origin'

This code is awful. :(

Change-Id: I0f5f1d68d686fdbfe90393ae93ebaff9cd11ffe6
Merge "version.py: Accept 'gerrit' as remote name as well as 'origin'"