curl_json: fix the array access implemented in f1e1e37e

In the avl-tree we store two different structs, cj_key_t for the value
we search, c_avl_tree_t for sub-nodes.
The old version does assume when it will find a key, and when a tree,
which doesn't have to be right in all cases.
Therefore we utilize the magic to revalidate this cast.
Being able to tell tree from key, we now can also implement array access
on the right most node of the tree-path.