remove json_references (no practial use?)

fix destructor

some comment-formatting
misuse prevention for replaceitem
update head comment to mention License of cJSON