Make patchset revision available as parameter in verified commands

The patchset revision is made available as a parameter in the commands
that are run when the build is started/successful/unstable/failed.

Also fixed a few typos.
Add missing Japanese translations

Change-Id: I5e777636e3f6954d4596fd8632771f4cea958252
Update help text for "build current patches only"

Change-Id: I55da2306b9bf688be02f70c15ac4d129eefd2687
Fix behavior of canceling old patch sets

There were several problems with canceling jobs created by old patch sets
when new patch sets are uploaded.

We were removing old jobs when scheduled() was called, but then removed()
was also called, which would cancel the newly-added build we care about.
Instead, we now store the PatchsetCreated event to track the jobs, and
cancel all jobs for a particular Change # when a new patch set is uploaded
but only remove the exact job when remove() is called.

There was also a problem in calling Future.cancel(), as documented in
https://issues.jenkins-ci.org/browse/JENKINS-13829.  This was worked around
by storing the parameters used to create each build and canceling jobs with
the same parameters.  This is more in-line with how jobs are canceled from
the Web UI.
Merge branch 'master' into i

Change-Id: I250ee3f1d08714e89663c07ccadf2293d7c5ead1
Obey the isScorable property of an event.

Will send code review 0 and verified 0 when the event isn't scorable.
Like for a ChangeMerged event.
Found some more backwards compatibility issues and fixed those.
But more tests of loading old jobs and builds are needed.

Change-Id: I1f74cad96d14c122b2646668a033ac3383476a36
Configurable verdict categories for trigger on comment

It is now possible to define verdict categories in the Gerrit
management UI. This is used for the trigger-on-comment-added
configuration in a project.

Change-Id: I44e1127f36f9b70bf1c4f6ff48a9f38470543fda
Config UI changes

Changed from 4 checkboxes to a hetero-list.
One or more trigger types can be added to a project.

Change-Id: I3889817b0f2256b4cf7079fd3591b5c4a1acf57b
Help texts for the Custom Build Message options

Add links to the help texts from the config panel.

Also fix file mode on config.jelly (was +x).

Change-Id: I3525e702f22b0699d3f035ec647bd1c7e35f81b2
Add support for triggering on the `draft-published` event

The `draft-published` event is fired from Gerrit when a change
is moved from draft state to new.

Also fix file mode on GerritTrigger.java (was +x).

Change-Id: Ia4c57b546b69a9c35e5b46b01568d158844b788c
Remove executable mode flag on files

Several .html and .java files have the executable mode flag set,
possibly as a result of being edited on a Windows system.

Remove the executable flag (chmod -x) on these files.

Change-Id: I2b3cc85ad318daca5da8ad78cb2095a8a9eda891
Merge branch 'master' of github.com:jenkinsci/gerrit-trigger-plugin into m
Merge branch 'origin/master' into i

Conflicts:
	gerrithudsontrigger/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/PluginImpl.java
	gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/spec/SpecGerritTriggerHudsonTest.java

Change-Id: Id469381ec1fc2e5bece28a20e2614bf847471f03
JENKINS-10055: NPE when commit to build is first commit in repository

When the commit to build is the first commit in the repository, it
does not have a parent commit.  In this case use the revision of
the commit itself as parent.

Change-Id: I167c02f10e2b657433da63323e04cc7f77733d65
Trigger on `draft-published` by default

Update the trigger initialisation to include the draft
published event as default, in addition to patch set created.

Change-Id: I74d0b5b3eb496dcee7ea55cba7afc65eb90cb7be
Enable trigger on draft published only when supported by Gerrit

The `draft-published` event is only available from Gerrit version
2.5, so add a check to only enable the feature if supported by
the current Gerrit version.

Change-Id: I7686542d23a3660b853c2c94e4cd78985257ca87