Fix and clean up pre git-review hook script

Once again somehow we were not getting the right project name for gerrit
and gerrit API would return incomplete results.

Also, ignore open patches that fail jenkins tests.

Change-Id: I48eced216caf3b2dde1f2ce333cfb6d93518c81d
Merge "Fix and clean up pre git-review hook script"