libfdt: Change FdtNodeMut::add_subnode*(self, ...)

As the borrow checker forbids having more than one mutable reference at
the same time and as FdtNodeMut is a wrapper around &mut Fdt, take the
ownership of the node when obtaining its first_subnode, allowing less
convoluted code when walking a mutable DT.

Bug: 324046698
Test: m pvmfw virtmgr fsfdt librialto libfdtpci
Test: m liblibfdt.integration_test libpvmfw.device_assignment.test
Change-Id: I1bbbebe263c21f95b3637bb6266b4308079ada8f
diff --git a/libs/libfdt/src/lib.rs b/libs/libfdt/src/lib.rs
index d1ab24e..d254af1 100644
--- a/libs/libfdt/src/lib.rs
+++ b/libs/libfdt/src/lib.rs
@@ -434,7 +434,7 @@
     }
 
     /// Adds new subnodes to the given node.
-    pub fn add_subnodes(&mut self, names: &[&CStr]) -> Result<()> {
+    pub fn add_subnodes(self, names: &[&CStr]) -> Result<()> {
         for name in names {
             self.fdt.add_subnode_namelen(self.offset, name.to_bytes())?;
         }
@@ -442,7 +442,7 @@
     }
 
     /// Adds a new subnode to the given node and return it as a FdtNodeMut on success.
-    pub fn add_subnode(&'a mut self, name: &CStr) -> Result<Self> {
+    pub fn add_subnode(self, name: &CStr) -> Result<Self> {
         let name = name.to_bytes();
         let offset = self.fdt.add_subnode_namelen(self.offset, name)?;
 
@@ -451,7 +451,7 @@
 
     /// Adds a new subnode to the given node with name and namelen, and returns it as a FdtNodeMut
     /// on success.
-    pub fn add_subnode_with_namelen(&'a mut self, name: &CStr, namelen: usize) -> Result<Self> {
+    pub fn add_subnode_with_namelen(self, name: &CStr, namelen: usize) -> Result<Self> {
         let name = &name.to_bytes()[..namelen];
         let offset = self.fdt.add_subnode_namelen(self.offset, name)?;