NodesWalk: allow foreach EdgeChooser implementation
NodesWalk: allow foreach EdgeChooser implementation

Instead of returning a range object, allow to provide foreach()
function that takes the current node and a function pointer and then
calls the given function on each node that should be processed next
(the function enqueues the nodes into the NodesWalk's queue).

mchalupa/dg,mchalupa/dg,mchalupa/dg,mchalupa/dg