Remove instance field in Plugin class

Jenkins creates only one instance from Plugin class then manage it.
So the field which keeps own instance is not needed.

Instead, we should use getPlugin(Class<T> clazz) in Jenkins class.
Change the implementation of server list to CopyOnWriteList

The purpose of this change is to throw away some synchronized methods.

Plugin instance is accessed from a lot of threads. So synchronized
methods block many processes. It would become a critical issue
if implement remote API.

This change solves such situation by using CopyOnWriteList.
It will improve UI performance.
Add remote API

This change adds remote API support.

You can get the status of Gerrit server using belowi url:

$JENKINS_URL/plugin/gerrit-trigger/api/
Fix checkstyle errors
Wait for expected build number instead the number of build
Migrate HudsonTestCase to JenkinsRule

In the latest release of Jenkins, HudsonTestCase is already deprecated.
Seems some extended tests don't work with the latest Jenkins.

This patch migrates HudsonTestCase to JenkinsRule.
Merge pull request #187 from rinrinne/jenkins-rule

Migrate HudsonTestCase to JenkinsRule
Merge pull request #186 from rinrinne/export-api

Add support for remote API
rescheduled inflight pushes + events not in cache

With high volume repos, it is possible for Gerrit to re-schedule a replication
due to an inflight push. This re-schedule will result in a failed replication state
and will result in a failed build. By only proceeding on a successful replication
status, this will be avoided.

This commit also includes a fix to cope with missed events due to a Jenkins restart
Improve help for draft published

Added a warning note for the usage of Draft Published events
when using Replication Events. The note is only seen when replication
is configured at the admin level.

Upgraded to gerrit-events 2.4.2