The purpose of `NodeTreeRef` was to speed up various queries on a read-only `bNodeTree`. Now that we have runtime data in nodes and sockets, we can also store the result of some queries there, removing the need for a separate data structure.
This patch refactors `DerivedNodeTree` so that it does not use `NodeTreeRef` anymore but uses `bNodeTree` directly.
Todo:
* Remove remaining usages of `NodeTreeRef`.
* Decide on an api.