Implemented reaction on the ChangeMerged event

The first commit in this set fixes the following issue: https://issues.jenkins-ci.org/browse/JENKINS-10549

The rest of commits implements ability to retrigger build of all open changes on a branch when this branch is modified in gerrit by merging a patchset into it. This feature can be enabled/disabled in the project configuration for each branch specified in the gerrit trigger options section.

This is useful when a project is configured to merge changes before build. If there are two independent changes on review in the gerrit servet. Both of them are depends on the top of the branch and both of them have already been built by the jenkins. When one of them is merged another one can be broken. With the feature implemented in this pull request second comit will be rebuild and all merge related issues will be caught.