adding Message serializer for gson

When using Gson Serialization, validations messages(I18nMessage) are not serialized properly.

Adding MessageSerializer to fix it.