Add new interface for handler

Now library user need to use GerritHandler directly to handle event.
It has possibility for user to call unnecessary method.

To avoid this, this patch provides new interface class to use
GerritHandler safely.

Also new connection event type is provided.
Implement Handler to GerritHandler

This patch implements Handler to GerritHandler.

Some methods are deprecated. And GerritHandler will not provide
connection status anymore.
Add overload method for JSONObject parameter
Add important comment

Some methods pass parameters to the constructor of the Work class.
It is referenced by other thread. Thus it is expected that objects
referenced by parameters are not updated.

So this patch adds a caution to method document.
Add new method to check interesting and usable for JSONObject

For new Work class, interesting and usable check for JSONObject is
isolated from original method then put it to new method.
Add new Work class

For handle JSONObject directly, new Work class "JSONEventWork" is added.
Implement addtional method for handler
Integrate post logic to one method

Handler has many similar methods. It means that many similar logics
could be put to implementation class.

This patch integrates post logic to one method to prevent logic
duplication.
Remove unnecessary import

To fix checkstyle error.
Add new interface for handler

Now library user need to use GerritHandler directly to handle event.
It has possibility for user to call unnecessary method.

To avoid this, this patch provides new interface class to use
GerritHandler safely.

Also new connection event type is provided.
Implement Handler to GerritHandler

This patch implements Handler to GerritHandler.

Some methods are deprecated. And GerritHandler will not provide
connection status anymore.
Add overload method for JSONObject parameter
Add important comment

Some methods pass parameters to the constructor of the Work class.
It is referenced by other thread. Thus it is expected that objects
referenced by parameters are not updated.

So this patch adds a caution to method document.
Add new method to check interesting and usable for JSONObject

For new Work class, interesting and usable check for JSONObject is
isolated from original method then put it to new method.
Add new Work class

For handle JSONObject directly, new Work class "JSONEventWork" is added.
Implement addtional method for handler
Integrate post logic to one method

Handler has many similar methods. It means that many similar logics
could be put to implementation class.

This patch integrates post logic to one method to prevent logic
duplication.
Remove unnecessary import

To fix checkstyle error.
Merge branch 'handler-interface' of https://github.com/rinrinne/gerrit-trigger-plugin into handler-interface
Replace addListener(ConnectionListener)

The return value of addListener(ConnectionListener) was changed
from boolean to void. So replace existing code.

If you would like to know connection status, you can use
GerritConnection#isConnected().