New functions to serialize meta2v2 beans to/from JSON

These functions were extracted from metacd-http. We will need them in meta2 as soon as we implement the reverse directory. Metacd-http will have to link to meta2v2utils.so instead of using its own functions.