Task/valgrind after compounds

### Description
Fixed a few memory leaks, introduced during the implementation of compound values for context attributes.
Also, in one of the json harness tests (compound_convop_json), the value of a leaf was changed from a string to an integer, just to see whether this would give us any problems.