C++: replace a tree by a hash

Be more environment friendly by using less trees.

Change-Id: I54d3b23d697a3b72a6a803688a8da0eddaad3e17
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>