json: Fix leaked nodes in json_hash_object()