Factor out a tree module

Small rust module that represents the root of the node tree and
allows to remove some logic from handle.c
3 jobs for cleanup in 7 minutes and 39 seconds (queued for 4 minutes and 3 seconds)
Status Job ID Name Coverage
  Test
passed #87754
fedora test

00:07:16

 
  Lint
manual #87756
allowed to fail manual
clippy
passed #87755
rustfmt

00:00:23