Hardening/619 escaped output

### Description
This PR is only to sync kz-fermin, to see how we want it.
There is one unit test failing (Metadata_test) and 5-6 functional tests failing too.
The failures are because of Associations.
Also missing is an intelligent handling of compound values.

OK, to merge into feature/619_escaped_output, but for develop there is still work to be done.
It's just that the "<unspecified file>(1)", coming from the json library contains forbidden characters and we will have to use some other text there. Not implemented yet.
Remember this PR is just a 'on the same page PR' ...
You will see the final outcome in the real PR.