collectd/collectd — pull request #784 by dothebart (2014-10-30 20:47:53+00:00)
Title: fix the array access implemented in #f1e1e37ead10d17dd30ca1992d64335f9c53c838

(this PR supperseedes #768 and implements the changes requested by @mfournier )
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.