ProcessingMessage: reorganize code

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
Add an AsJson interface

This interface provides only one method which returns a JSON representation of
the instance.

Retrofit Json{Schema,}Tree to provide this interface. Also change the latter to
force implementors to implement .toString().

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
JsonSchemaTree and derivates: modify interface/implementations

It did not contain what was necessary for ref resolution.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>