improve node tree performance

- only do one query to generate the node tree
- nested set implementation in node table