Fixed severe memory leak issues with CTJSONParse and CTJSONSerialise.