Introduce ForeachNode and ForeachNodeSorted.

Allows looping over all nodes under a particular node, calling a callback
with the node name and node as arguments foreach node.

Rename ForeachSorted to ForeachSortedVal.
Merge pull request #1 from art4711/foreachnode

Introduce ForeachNode and ForeachNodeSorted.