NodeInterval and other invoice tree related classes rework; in particular:
- Fix search apis and add unit tests
- Add method to walk the tree and build json serialization on top of it.
- Other renaming