Adapt JS to work in PolyGerrit * Gerrit commit 172acf7e183d3c6ff2994a8ddf00847f4dbd6d34 (plugin.deprecated.onAction partial support, 2017-10-23) added support to PolyGerrit for the JS APIs this plugin needs. Make use of that support. * Use context.refresh and self.on instead of Gerrit.refresh and Gerrit.on, since PolyGerrit implements the former. Feature: Issue 6145 Change-Id: I12ef2d0df88ee8b953c64cc07ab27a8872ca9f2b