Add support for using java.util.Date in communications (#13073)

This adds support for using separate serializer classes on the
server side, similarly to on the client side. Still it is not
public API yet as you do not have the possibility to add your
own serializers to the map used by JsonCodec.

Change-Id: I2cc4f628c5a8eba90abbd57c128c6359cbe1b4d7