Added support for Gson configuration. (useful for Date format)

This change allows for providing custom Gson instance with custom serializers and deserializers or just custom date format. Or, you can keep default Gson instance for backward compatibility.

Current JSON-RPC uses the default Gson instance which uses an incomplete date format with no time zone and doesn't provide any way for changing it. This results in wrong time offsets when the client is on different timezone from the server.

Note that this change doesn't change the default date format and only provides a way to do so. JSON doesn't specify a date format.

A side-effect of the change is using a single Gson instance instead of creating new instance with each method invocation. Gson is thread safe.