refactor gerrit util (minor clean up)

- change no argument Function to Supplier
- generify accessRest to match types of Supplier and Consumer