Implemented for_each in a node tree and fix mutex

- Routing Table had a atomic variable but it was not needed
  as a mutex was also required.
- for_each node in NodeTree implemented to allow serializing the content
  of the tree.