Factor out VarRefToJsonELement for common usage
Redmine#4703: mapjson() function and add data container support to maparray()
Fixes from @sigurdteigen comments on #1485
Redmine#4703: mapjson() should escape " properly for JSON
Redmine#4703: fix 01_vars/02_functions/mergedata.cf to test explicitly
Redmine#4703: rename mapjson() to mapdata() and add extra parameter
Redmine#4703: simplify VarRefToJson and always own returned JsonElement